-
-
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
Core: Support webpack5 and webpack4 side by side #13808
Conversation
e89a168
to
739cc4c
Compare
Early, completely non-optimized perf testing. Install size up, build size downThis is a CRA benchmark (webpack4) and we are building the Storybook "manager" UI with (webpack5), so that accounts for the extra install time. But build time is faster (20s vs ~30s before) with no optimizations added yet. Static storybooks load slightly fasterFor static storybooks, time to first render is slightly faster (300ms vs 370ms before): |
@ndelangen we still need to set up an e2e test for webpack5, but can do it in a separate PR. @gaetanmaisse I've broken the yarn2 PNP test but am merging anyway because my head will explode if I look at this PR any longer. Apologies for continuing to subject you to this. |
@shilman Somehow running I guess the detection phase needs some extra care. Ps: any way to force use the webpack5 one? |
@phaistonian yes you need to set it in module.exports = {
core: { builder: 'webpack5' }
} See the full migration guide here: https://gist.github.com/shilman/8856ea1786dcd247139b47b270912324 |
Issue: #9216
What I did
With @ndelangen:
@storybook/core
intocore-server
,core-client
,core-common
builder-webpack4
,builder-webpack5
next
How to test
See
core-presets.test.ts
whose snapshots we've manually checked againstnext
(webpack4)