-
Notifications
You must be signed in to change notification settings - Fork 13
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
Please upgrade to Webpack v5 #40
Comments
Out of curiosity: Did you try the native tree-shaking for CommonJS in webpack 5? It should have the advantage of working across CJS/ESM boundaries. |
I have tried - it does not work |
@budarin Do you have a repro / link to a webpack issue for this case? Maybe it's a configuration issue or something specific to core.js (I assume you mean the polyfills)? If the tree-shaking doesn't work for core-js, that feels worth fixing in wp5. @sokra Are you aware of the common-shake plugin and/or do you know if the native support wp5 should "just work" as a drop-in replacement? |
I can't share repo - it's company's project |
Sorry, subtle difference "repro" vs "repo". In other words: do you know of a minimal set of files that triggers the behavior? It would be a decent chunk of work to touch up this plugin for WP5 with a very real risk that it would be almost immediately irrelevant as WP5 fixes those bugs. So I'd personally be much more likely to look at fixing the tree-shaking bug in Webpack than to work on the plug-in. But for that I'd need to know what the actual bug is. :) The above is just from my perspective, other people involved with this plugin may feel differently. |
Webpack 5 commonjs tree shaking is kind of work in progress. The foundation is there, but it doesn't support all syntax possible. A very common case that is not supported yet is e. g. The most valuable contribution would be test cases especially edge cases for commonjs tree shaking. Maybe we can copy some from here? |
Note that tree shaking in webpack also means that export names are mangled to shorter names, which makes it extra tricky. |
@sokra |
the current version is not compatible with Webpack 5
The text was updated successfully, but these errors were encountered: