-
Notifications
You must be signed in to change notification settings - Fork 2.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
feat(storybook): add Webpack 5 support for React Storybook setups #6791
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/nrwl/nx-dev/HaVhNM588mF25sEoUhuSxEVFaRNu [Deployment for 6c5dd73 canceled] |
e2b083a
to
534ec40
Compare
534ec40
to
4fccd97
Compare
61af2a1
to
38f4c08
Compare
38f4c08
to
34e062a
Compare
34e062a
to
1fe6b18
Compare
1fe6b18
to
d5de774
Compare
d5de774
to
dc9070b
Compare
dc9070b
to
e517946
Compare
e517946
to
b985331
Compare
b985331
to
2702e09
Compare
2702e09
to
6c5dd73
Compare
Need this for the webpack upgrade. Merging it and removing the |
This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request. |
Current Behavior
Right now, React with Webpack 5 is just an opt-in, which is also why the current Storybook generator doesn't use the Webpack 5 setup by default.
Expected Behavior
This PR adds two things:
a) a warning if an existing Storybook configuration doesn't use the Webpack 5 configuration
b) Detects whether the React setup uses Webpack 5 and makes sure to generate proper Webpack 5 setup for Storybook react stories
Newest changes:
User migrates to Webpack 5
User uses this guide.
When they run
to migrate their React projects, this generator will also do the following:
@storybook/react
package installed@storybook/builder-webpack5
and@storybook/manager-webpack5
if they are not already installedbuilder: 'webpack5'
option in the Storybook configurations (.storybook/main.js
) of their React projectsRelated Issue(s)
Fixes #6703