Skip to content
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

Merged
merged 3 commits into from
Mar 31, 2022

Conversation

ndelangen
Copy link
Member

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.

@nx-cloud
Copy link

nx-cloud bot commented Mar 31, 2022

☁️ Nx Cloud Report

CI 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 target

Sent with 💌 from NxCloud.

@ndelangen
Copy link
Member Author

@shilman perhaps something worthy of a patch?

@kroeder
Copy link
Member

kroeder commented Mar 31, 2022

@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

@shilman shilman changed the title change version ranges of webpack in the apps (same as app/react) Webpack: Expand version ranges of webpack in the apps (same as app/react) Mar 31, 2022
Copy link
Member

@shilman shilman left a 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"
Copy link
Member

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"

Copy link
Member Author

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

@ndelangen ndelangen merged commit 548783d into next Mar 31, 2022
@ndelangen ndelangen deleted the tech/improve-version-range-webpack branch March 31, 2022 12:42
@kroeder
Copy link
Member

kroeder commented Apr 1, 2022

I tested the latest alpha that includes this PR and did a fresh re-install (deleted node_modules, package-lock.json, npm install)
I got no more errors in npm 8 🎉

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 npm ls webpack

+-- @angular-devkit/[email protected]
| +-- @angular-devkit/[email protected]
| | `-- [email protected] deduped
| +-- @ngtools/[email protected]
| | `-- [email protected] deduped
| +-- [email protected]
| | `-- [email protected] deduped
| +-- [email protected]
| | `-- [email protected] deduped
| +-- [email protected]
| | `-- [email protected] deduped
| +-- [email protected]
| | `-- [email protected] deduped
| +-- [email protected]
| | `-- [email protected] deduped
| +-- [email protected]
| | `-- [email protected] deduped
| +-- [email protected]
| | `-- [email protected] deduped
| +-- [email protected]
| | `-- [email protected] deduped
| +-- [email protected]
| | `-- [email protected] deduped
| +-- [email protected]
| | `-- [email protected] deduped
| +-- [email protected]
| | `-- [email protected] deduped
| +-- [email protected]
| | `-- [email protected] deduped
| +-- [email protected]
| | `-- [email protected] deduped
| `-- [email protected]
+-- @storybook/[email protected]
| `-- @storybook/[email protected]
|   +-- [email protected]
|   | `-- [email protected] deduped
|   `-- [email protected]
|     `-- [email protected]
|       `-- [email protected] deduped
+-- @storybook/[email protected]
| +-- @storybook/[email protected]
| | +-- @storybook/[email protected]
| | | +-- @storybook/[email protected]
| | | | +-- [email protected]
| | | | | `-- [email protected] deduped
| | | | +-- [email protected]
| | | | | `-- [email protected] deduped
| | | | +-- [email protected]
| | | | | `-- [email protected] deduped
| | | | +-- [email protected]
| | | | | `-- [email protected] deduped
| | | | +-- [email protected]
| | | | | `-- [email protected] deduped
| | | | +-- [email protected]
| | | | | `-- [email protected] deduped
| | | | +-- [email protected]
| | | | | `-- [email protected] deduped
| | | | +-- [email protected]
| | | | | `-- [email protected] deduped
| | | | +-- [email protected]
| | | | | `-- [email protected] deduped
| | | | `-- [email protected]
| | | |   `-- [email protected]
| | | |     `-- [email protected] deduped
| | | +-- @storybook/[email protected]
| | | | +-- [email protected]
| | | | | `-- [email protected] deduped
| | | | +-- [email protected]
| | | | | `-- [email protected] deduped
| | | | +-- [email protected]
| | | | | `-- [email protected] deduped
| | | | +-- [email protected]
| | | | | `-- [email protected] deduped
| | | | +-- [email protected]
| | | | | `-- [email protected] deduped
| | | | `-- [email protected]
| | | |   `-- [email protected]
| | | |     `-- [email protected] deduped
| | | `-- [email protected]
| | |   `-- [email protected]
| | |     `-- [email protected] deduped
| | `-- [email protected] deduped
| +-- [email protected]
| | `-- [email protected] deduped
| +-- [email protected]
| | `-- [email protected] deduped
| +-- [email protected]
| | `-- [email protected] deduped
| +-- [email protected]
| | `-- [email protected] deduped
| `-- [email protected] deduped
+-- @storybook/[email protected]
| +-- [email protected]
| | `-- [email protected] deduped
| +-- [email protected]
| | `-- [email protected] deduped
| +-- [email protected]
| | `-- [email protected] deduped
| +-- [email protected]
| | `-- [email protected] deduped
| +-- [email protected]
| | `-- [email protected] deduped
| +-- [email protected]
| | `-- [email protected] deduped
| `-- [email protected] deduped
+-- @storybook/[email protected]
| +-- @storybook/[email protected]
| | `-- [email protected] deduped
| +-- [email protected]
| | `-- [email protected] deduped
| +-- [email protected]
| | `-- [email protected] deduped
| `-- [email protected] deduped
+-- [email protected]
| `-- [email protected] deduped
+-- [email protected]
| `-- [email protected]
|   `-- [email protected] deduped
`-- storybook-webpack-angular-types-plugin@0.2.0-0.hotfix-recursion.3
  `-- [email protected] deduped

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants