-
-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Optimize webpack-builder: minify using swc #22843
Conversation
Terser:
SWC:
before: This data is from an extremely small storybook, I'll do a little investigation on a larger one. |
I asked @JonathanKolnik to test this change on the chromatic storybook and we saw this: Before: After: |
@jonniebigodes When we're writing the docs for the useSWC feature flag, it should mention that besides changing the babel-loader to csw-loader, it also switches TerserPlugin for scwMinify (after this PR is merged) |
Appreciate the heads up @ndelangen, I think we have time between the change being up and it getting published 🙏 |
@shilman self-merging |
I found that terserPlugin support swc, and considering what we use to optimize storybook with isn't really a public API anyway... I figured I could just sneak this in and replace terser with swc.
see: https://webpack.js.org/plugins/terser-webpack-plugin/#swc
Related: #18329
Related: #19994
Related: #15548