-
-
Notifications
You must be signed in to change notification settings - Fork 24
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
Problem bundling with webpack #21
Comments
Hello I used the following patch to make it work.
|
I also managed to make use of dynamic requires in node by using |
I also managed to write a babel plugin that I apply to this module using You can look at this gist : https://gist.github.com/jeremiegirault/11018bc6aec790ca8d3714f5e0a1bd35 |
Hi, I just stumbled over bundling import-fresh with webpack. Webpack will not ignore the dynamic require calls and so this package will fail after bundling.
See here for a detailed description of the issue and my workaround.
An easy fix would be to add the "magic comments" to your code:
Users that want to bundle your package with webpack would still have to activate "magic comments" for require in their webpack config, so maybe there is a better solution for this.
The text was updated successfully, but these errors were encountered: