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

fix: make webpack optional peer dependency #4778

Merged
merged 1 commit into from Mar 18, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions package.json
Expand Up @@ -139,6 +139,9 @@
"peerDependenciesMeta": {
"webpack-cli": {
"optional": true
},
"webpack": {
"optional": true
}
Comment on lines +142 to 145
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You may also want to remove it from the peerDependenciesfield above

"webpack": "^4.37.0 || ^5.0.0"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if we remove webpack from peerDependencies it would mean any webpack version would be ok for webpack-dev-server but webpack-dev-server did require specific webpack version according to the documentation of https://pnpm.io/next/package_json#peerdependenciesmetaoptional

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, we still need versions, in theory this PR can break a code for some inattentive developers (which ignored warnings from package managers), if you don't have webpack in dependcies and rely on the new behaviour of npm (autoinstall peer deps), but it should be fixed on their side, because you should always list of you dependecies

}
}