-
-
Notifications
You must be signed in to change notification settings - Fork 10
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
webpack warning when importing dcl / dynamic use of require calls #24
Comments
I am already building a version with globals for browsers (some people prefer this style as being easier to integrate). It looks like I should start build a special static version for tools like |
@uhop: Depending on if you are using web components or not, webpack could use the source (if using WC, it needs to be babel-ized). It could be a simple matter of changing the "main" in the npm package. |
I looked into that more. For browser + Babel, it is easier to use |
I added ES6 distro in dd2fceb AKA version 2.0.3 published on npm. How to use it documented in README. Try it, and reopen the ticket, if you have any problems. I am interested to play nice with Babel in all possible configurations, because ES6 will be a native version of the upcoming |
I tried it in the real React project. Use 2.0.5, which has some downgraded prologue for ES6 modules. The original 2.0.3 has used a lambda, which was some reason was rejected by Babel. |
First of all, thanks @uhop for your new major release - it's great that you're continuosly improving the library!
When using it on a node.js project with webpack bundling, webpack gives the following warnings:
seems it cannot do a static analysis on required modules because of the
line where a variable is passed to the require function.
For more information, also please have a look at the discussion in webpack/webpack#196.
Could this be easily replaced with more static parameters to the require function?
Thanks & with best regards,
Stefan
The text was updated successfully, but these errors were encountered: