Adding the mangle property causes 'invalid options'
RyenNelsen opened this issue · 1 comments
RyenNelsen commented
- Operating System: Windows 10
- Node Version: 11.3.0
- NPM Version: 6.4.1
- webpack Version: 4.28.3
- uglifyjs-webpack-plugin Version: 2.1.1
Expected Behavior
I would expect it to actually compile if the mangle
property is set.
Actual Behavior
While compiling, webpack exits with the error:
UglifyJs Plugin Invalid Options
options should NOT have additional properties
ValidationError: UglifyJs Plugin Invalid Options
Code
// webpack.config.js
optimization: {
minimizer: [
new UglifyjsWebpackPlugin({
cache: true,
parallel: true,
mangle: false,
}),
],
},
I also tried:
// webpack.config.js
optimization: {
minimizer: [
new UglifyjsWebpackPlugin({
cache: true,
parallel: true,
mangle: true,
}),
],
},
How Do We Reproduce?
Just try setting the mangle
property.
If I remove the property, webpack will compile and UglifyJs will mangle the output. My end goal is to be able to set mangle.properties
.
alexander-akait commented
https://github.com/webpack-contrib/uglifyjs-webpack-plugin#uglifyoptions
Put this option in uglifyOptions
option.