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
CLI: Add webpack4/5 detection #17908
CLI: Add webpack4/5 detection #17908
Conversation
…dependencies from core-server at some point
☁️ Nx Cloud ReportCI is running/has finished running commands for commit 8ef8085. As they complete they will appear below. Click to see the status, the terminal output, and the build insights. 📂 See all runs for this branch ✅ Successfully ran 1 targetSent with 💌 from NxCloud. |
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.
Great job @ndelangen 💯
😎 |
How can I set which webpack version I want storybook to use after this update? |
@daniel-stoian-lgp you can set the https://storybook.js.org/docs/6.5/react/configure/webpack#webpack-5 |
What I did
The CLI can now detect which version of webpack you are using. If it detects you have webpack version 4 installed anywhere, it will use builder-webpack4, if you do not, and you have webpack v5 installed instead, it will use builder-webpack5.
It will still default to use builder-webpack4 if it can't detect anything.
I also added the builder-webpack4 and manager-webpack4 in the case the builder is indeed webpack4. Seems like the right thing to do, if we don't want core-server to depend on any builder in particular.