building for production...[ Error: static/js/0.e5262afb6d92aae69c76.js from UglifyJs
`warnings` is not a supported option
at Function.buildError (/mypath/node_modules/[email protected]@uglifyjs-webpack-plugin/dist/index.js:114:12)
at results.forEach (/mypath/node_modules/[email protected]@uglifyjs-webpack-plugin/dist/index.js:255:52)
at Array.forEach (<anonymous>)
at taskRunner.run (/mypath/node_modules/[email protected]@uglifyjs-webpack-plugin/dist/index.js:242:17)
at step (/mypath/node_modules/[email protected]@uglifyjs-webpack-plugin/dist/TaskRunner.js:76:9)
at done (/mypath/node_modules/[email protected]@uglifyjs-webpack-plugin/dist/TaskRunner.js:84:30)
at boundWorkers (/mypath/node_modules/[email protected]@uglifyjs-webpack-plugin/dist/TaskRunner.js:89:13)
at /mypath/node_modules/[email protected]@worker-farm/lib/farm.js:199:19
at process._tickCallback (internal/process/next_tick.js:61:11),
Error: static/js/1.89c4c336d047e363641c.js from UglifyJs
This error occurs when npm run build
today,
all things are right 4 days ago.
Today when I update my local node_modules, it just happens.
I think it should be some package released new version a few day ago
Any help would be appreciated!
update
This error caused by last version [email protected],
remove warnings
in options can temporarily fix this error.
uglifyOptions: {
compress: {
warnings: false,
pure_funcs: ['console.log']
}
}
It's caused by upgrade of Uglify-js, detail in : https://github.com/mishoo/UglifyJS2/issues/3394
The solution is :
use:
{
"warnings": value
}
instead of:
{
"compress": {
"warnings": value
}
}
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