-
-
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
Webpack: Expand version ranges of webpack in the apps (same as app/react) #17834
Conversation
☁️ Nx Cloud ReportCI is running/has finished running commands for commit b5edf10. 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. |
@shilman perhaps something worthy of a patch? |
I can try it in an alpha version first if you want to be extra sure! I'm using the latest next version of Storybook |
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.
LGTM!
@@ -80,7 +80,7 @@ | |||
"ts-loader": "^8.0.14", | |||
"tsconfig-paths-webpack-plugin": "^3.3.0", | |||
"util-deprecate": "^1.0.2", | |||
"webpack": "4" | |||
"webpack": ">=4.0.0 <6.0.0" |
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.
React's is a bit different. Do we care?
"webpack": ">=4.43.0 <6.0.0"
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.
didn't want to introduce new constraints
I tested the latest alpha that includes this PR and did a fresh re-install (deleted node_modules, package-lock.json, npm install) However, there are still webpack v4 versions deeply nested. The good thing is that npm does not want to hoist them Here's the result of
|
Issue: Seems in some apps we have a direct dependency on webpack "4", when it should be a dependency on any version between 4 & 5 since we started supporting webpack 5.
@kroeder alerted me on dependency issues relating to angular, and I looked around the codebase and concluded this problem existed in a few more frameworks.
What I did
I made the version of webpack we depend on a bigger range. This is exactly how we do it already for app/react.