Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pluginutils] (or any other rollup part) should not depend on "blatantly non ESM" modules #503

Closed
pkit opened this issue Jul 22, 2020 · 2 comments

Comments

@pkit
Copy link

pkit commented Jul 22, 2020

  • Rollup Plugin Name: pluginutils
  • Rollup Plugin Version: HEAD

Expected Behavior / Situation

Compiles in browser

Actual Behavior / Situation

Does not compile, because picomatch is a cjs-only module with no default export.

Error: 'default' is not exported by https://cdn.jsdelivr.net/npm/[email protected]/index.js

Modification Proposal

picomatch looks abandoned (typed proposition hangs for 9 month already), just replicate the functionality within plugin itself.
I can probably create a PR if you want.

@pkit pkit changed the title pluginutils (or any other rollup part) should not depend on "blatantly non ESM" modules [pluginutils] (or any other rollup part) should not depend on "blatantly non ESM" modules Jul 22, 2020
@shellscape
Copy link
Collaborator

Thanks for opening an issue. Unfortunately this is not within a reasonable proposal. Plugins are intended for use at development-time and not at runtime. If you are attempting to use any during runtime in a browser environment, please use a compatible compiler.

@pkit
Copy link
Author

pkit commented Jul 22, 2020

Use case is codesandbox-like in-browser dev env.
Where custom rollup.config.js should be able to load and transpile correctly.
Although I think what I really need is just a commonjs plugin without the load() hook.
Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants