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 5 gives peer dependency warning #1504

Closed
GaryB432 opened this issue Aug 31, 2020 · 4 comments · Fixed by airyhq/airy#1168 or backstage/backstage#4951
Closed

Webpack 5 gives peer dependency warning #1504

GaryB432 opened this issue Aug 31, 2020 · 4 comments · Fixed by airyhq/airy#1168 or backstage/backstage#4951

Comments

@GaryB432
Copy link
Contributor

Expected behaviour

Plugin should allow webpack 5 pre-releases peer dependency without warning

Current behaviour

npm install

npm WARN html-webpack-plugin@4.4.1 requires a peer of webpack@>=4.0.0 < 6.0.0 but none is installed. You must install peer dependencies yourself.

Environment

Node.js v12.18.2
win32 10.0.18362
npm 6.14.5
webpack@5.0.0-beta.29
html-webpack-plugin@4.4.1

Notes

I guess 5.0.0-beta.29 is indeed less than 6.0.0 but I wonder if the embedded spaces in your peerDependencies range specification is correct. Maybe we want webpack@>=4.0.0 <6.0.0

@GaryB432
Copy link
Contributor Author

looks like other plugins are warning about, e.g., webpack@^4.37.0 || ^5.0.0 too. I am unsure about the prelease tag handling and why 5.0.0-beta.29 doesn't satisfy this range either.

@GaryB432
Copy link
Contributor Author

ref Masterminds/semver#10 (comment)

It seems reasonable that the plugin would warn when webpack has a prerelease tag. But you still may want to remove your space or use the double-pipe specification as in my prior comment. Thanks for the great plugin!

@jantimon
Copy link
Owner

jantimon commented Sep 1, 2020

Cool - can you please <create a pr?

GaryB432 added a commit to GaryB432/html-webpack-plugin that referenced this issue Sep 1, 2020
@alexander-akait
Copy link
Collaborator

Please avoid adding 5.0.0-beta.29 because when we something change in rc releases you need to keep compatibility with 5.0.0-beta.29 otherwise it will be breaking change

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