Is there a way to skip the uglify js plugin from webpack 2 when runs in --production
mode?
To disable it, you can do --js-opts 0 which will disable the JS optimizer. For small JS sizes that's probably ok (and you can run your own JS minifier later if you want).
This plugin uses uglify-js to minify your JavaScript.
Uglify JS is a JavaScript library for minifying JavaScript files.
Uglifying is transforming the code into an "unreadable" form by changing variable names, function names, etc, to hide the original content. Once it is used there's no way to reverse it back. Some libraries like UglifyJS does minification when used, by removing unnecessary parts.
Found: https://github.com/webpack/webpack/blob/9734d00d8bf0d306654f40e9b34b60db9c7fdda1/bin/config-optimist.js#L47
optimist
.boolean("p")
.describe(
"p",
"shortcut for --optimize-minimize --define process.env.NODE_ENV=\"production\""
)
A temp workaround would be run webpack --define process.env.NODE_ENV=\"production\"
instead of webpack -p
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With