Strict mode - Detect duplicate UglifyPlugin
See original GitHub issueJust saw a case where a user was using -p
and UglifyPlugin
separately. Latter was used to set compress['drop_console']
. The problem is that this will lead to double minification and it won’t work as you might expect.
It would be good to be able to detect this case. Perhaps the same applies to some other plugins as well, but this would be a nice starting point.
Issue Analytics
- State:
- Created 7 years ago
- Comments:10 (5 by maintainers)
Top Results From Across the Web
Webpack generated broken code in production mode #307
Disable the uglify-es compress inline option as a workaround. Fixed by the use of terser in #296.
Read more >Google Closure using ES5 strict mode even though I specified ...
How do I overcome "object literals cannot contain duplicate keys in ES5 strict mode" error with Maven minify plugin? Related. 1 · Best...
Read more >Optimization - webpack
Tells webpack to merge chunks which contain the same modules. Setting optimization.mergeDuplicateChunks to false will disable this optimization. webpack.config.
Read more >Shrink, obfuscate, and optimize your app - Android Developers
Instead, the plugin works with the R8 compiler to handle the following compile-time tasks: Code shrinking (or tree-shaking): detects and safely removes unused ......
Read more >terser - npm
terser is a fork of uglify-es that mostly retains API and CLI compatibility with ... Strict mode is implied and the toplevel option...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Absolutely. We are just putting some bandaid on it. 😉
The implementation doesn’t look too bad. Both cases are fairly straight-forward to handle because we can piggyback on webpack’s own logic here.
I’m not so sure. We can definitely build an awesome prototype here and then negotiate. These kind of things are fairly simple in user space.
My thinking is that webpack core should drop all the flag stuff (less to maintain) but that’s another discussion. 👍