-
-
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
Migrate webpack configuration in 5.x #6081
Comments
A simpler option would be to restore |
I think storybook's CLI (start & build commands) should create a .log file when a problem is detected or someone passes This log can then be used to output things like the full webpack config. Before storybook actually starts we should do some final analysis of the webpack config for common known issues. (things like double loaders, double plugins, removal of storybook entrypoints) Also we want to create presets for the things most people are writing custom webpack config for. |
OK debugged this with @ndelangen. There was a regression in SB5 for webpack "extend mode" which caused the issues here. In 4.x extend-mode operated on Here is the diff in output between v4 and v5 extend configs (red is v4, green is v5): https://gist.github.com/shilman/5ce0d26a77d2774b13d30f7f346b93d5/revisions What we're going to do:
Adding this to #6104 now! |
Aha! Good work! |
Olé!! I just released https://github.com/storybooks/storybook/releases/tag/v5.1.0-alpha.7 containing PR #6082 that references this issue. Upgrade today to try it out! Because it's a pre-release you can find it on the Closing this issue. Please re-open if you think there's still more to do. |
Whoopee!! I just released https://github.com/storybooks/storybook/releases/tag/v5.0.2 containing PR #6082 that references this issue. Upgrade today to try it out! Closing this issue. Please re-open if you think there's still more to do. |
Still having issues importing SVGs. |
@elie222 i added a --debug-webpack CLI flag so you can see the final preview webpack config. How many rules do you have that match SVG? |
@jacobgranberry are you using 5.0.2? Also do you need to run with |
@shilman the extra dashes worked. sorry, still new to this. thank you for the quick response! |
We changed the webpack configuration API between 4.x and 5.x. Although we documented this change in MIGRATION.md, we didn't anticipate the chaos this change would cause, including:
There are probably more issues that we don't know about yet.
Discussed a path forward with @tmeasday and documenting this as an umbrella issue:
Deprecating extend mode
Extend mode is "magic" behavior that obscures customization without providing enough added value to justify its existence. It's also another code path and another source of confusion in documentation / mental model / etc. Instead we should encourage people to use full-control mode and make that as convenient as possible.
The text was updated successfully, but these errors were encountered: