wmr icon indicating copy to clipboard operation
wmr copied to clipboard

@rollup/plugin-strip issue with include/exclude options in windows

Open patak-cat opened this issue 5 years ago • 0 comments

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:

  1. Clone repro https://github.com/matias-capeletto/wmr-rollup-plugin-strip
  2. yarn then, yarn dev or yarn build
  3. console.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/

patak-cat avatar Mar 21 '21 13:03 patak-cat