@rollup/plugin-strip issue with include/exclude options in windows
We discussed a bit today with @marvinhagemeister in Vite Land.
Describe the bug
This is a Windows only compat issue that we also run into in Vite.
This is the equivalent issue report in Vite: https://github.com/vitejs/vite/issues/1522#issuecomment-761819314
And this the PR to fix it https://github.com/vitejs/vite/pull/1693, avoiding the removal of the volume unit (C:) in Windows.
You can check the default pattern for include in the plugin, that should match index.js
https://github.com/rollup/plugins/tree/master/packages/strip#include
This is not only an issue for @rollup/plugin-strip, but for all other plugins using createFilter from rollup utils.
To Reproduce
Steps to reproduce the behavior:
- Clone repro https://github.com/matias-capeletto/wmr-rollup-plugin-strip
yarnthen,yarn devoryarn buildconsole.log("this should be removed")should be removed in dev and prod
Expected behavior
The common createFilter pattern (include/exclude) used in rollup plugins should be supported.
Desktop (please complete the following information):
- OS: Windows 10
- Browser: n/a
- WMR Version v1.3.2
Additional context
We have a rollup plugin compat label in the Vite Repo. Other issues that we encountered may be present in WMR https://github.com/vitejs/vite/issues?q=is%3Aissue+label%3A%22rollup+plugin+compat%22+
For reference, I'm maintaining a Vite compatibility list for rollup plugins here https://vite-rollup-plugins.patak.dev/