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
[core] Use terser for minification in umd bundle #15491
Conversation
61d0c60
to
38ae652
Compare
@@ -8,7 +8,7 @@ import Popover from '../Popover'; | |||
import MenuList from '../MenuList'; | |||
import warning from 'warning'; | |||
import ReactDOM from 'react-dom'; | |||
import { setRef } from '@material-ui/core/utils/reactHelpers'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😱 Murphy!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This caused
@material-ui/core: parsed: -0.15% heart_eyes, gzip: -0.15% heart_eyes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to investigate why the script didn't fail. Preferably rollup would exit with non-zero.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
During the last release, I have seen unusual rollup warnings.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can see the same warning in the next build CI output:
The warnings are gone on this branch 👌.
@TrySound Do you know if we can make these warnings failing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, you can
onwarn(warning, warn) {
if (condition1) {
return;
}
if (condition2) {
return warn(warning)
}
throw Error(warning.message);
},
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome, I'm trying this out :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@material-ui/core: parsed: -0.15% 😍, gzip: -0.15% 😍 Details of bundle changes.Comparing: 1155be4...b24ddcd
|
I think webpack 4 already uses terser out of the box. And I migrated rollup-plugin-uglify back to uglify-js. uglify-es is dead project. Terser is uglify-es fork of activists. |
Makes it easier to switch between es5 and es6 builds. uglify-js does not support es6 while terser is the better alternative to uglify-es. webpack 5 will use terser by default.