-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
DefaultsError: warnings
is not a supported option
#3394
Comments
I've just checked, and even And since you haven't provided any details of your particular issue, I can only assume that you've the following: {
"compress": {
"warnings": value
}
} instead of simply: {
"warnings": value
} |
I do. That fixes it. Thanks for the quick reply/fix! |
I noticed the same error (warnings is not a supported option) in my setup using uglify-js 3.5.6 and uglifyjs-webpack-plugin 2.1.2 and webpack 4.30.0. I'm not sure why but the error only popped up in the last few days even though I hadn't touched my package versions in a few weeks. I wasn't setting compress -> warnings in my config. However, what I am doing is calling I see I upgraded to uglify-js 3.5.10 and in that version, |
due to [this change](mishoo/UglifyJS#3394) in Uglify-js, umi build breaks. This commit change the Uglify-js config to support the new grammer
- add missing: `assignments`, `directives`, `functions`, `keep_fargs`, `objects`, `pure_funcs` - remove `warnings` options - refine JSDoc comments and add defaults https://github.com/mishoo/UglifyJS2#compress-options mishoo/UglifyJS#3394 (comment) Thanks!
- add missing: `assignments`, `directives`, `functions`, `keep_fargs`, `objects`, `pure_funcs` - remove `warnings` options - refine JSDoc comments and add defaults https://github.com/mishoo/UglifyJS2#compress-options mishoo/UglifyJS#3394 (comment) Thanks!
* update(uglify-js): update Compression options - add missing: `assignments`, `directives`, `functions`, `keep_fargs`, `objects`, `pure_funcs` - remove `warnings` options - refine JSDoc comments and add defaults https://github.com/mishoo/UglifyJS2#compress-options mishoo/UglifyJS#3394 (comment) Thanks! * [fix] update UglifyJS webpack plugin usage Fixes issue with CI build in WebPack tests https://git.io/JvKu7 https://github.com/mishoo/UglifyJS2#compress-options
Was receiving errors like the following: [!] (uglify plugin) Error: Error transforming bundle with 'uglify' plugin: `warnings` is not a supported option Error: Error transforming bundle with 'uglify' plugin: `warnings` is not a supported option at error (/Users/lawrenn/code/bc/react-datepicker/node_modules/rollup/dist/rollup.js:185:14) at /Users/lawrenn/code/bc/react-datepicker/node_modules/rollup/dist/rollup.js:9544:5 Looks like the fix for this is to move warnings to the top level of the options object, rather than nested in compress; see: mishoo/UglifyJS#3394
Bug report
When using the latest version 3.5.10 I'm seeing error when building with webpack.
Version 3.5.9 has no problems.
Version 3.5.10, webpack version 4.29.6
JavaScript output or error produced.
The text was updated successfully, but these errors were encountered: