-
-
Notifications
You must be signed in to change notification settings - Fork 1.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
added v5 compilation support and deleted depreciation warnings #1454
added v5 compilation support and deleted depreciation warnings #1454
Conversation
It's looks like there is an error on |
index.js
Outdated
}); | ||
}; | ||
|
||
const childCompilationOutputName = webpackMajorVersion === 5 |
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.
I would invert the logic to support future versions too (and as it is done in other parts of the codebase)
= webpackMajorVersion === 4 ? ... : ...
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.
That was my first thought too, but we'll lose backward compatibility with v3 and lower, and I'm not 100% that we should support them also? And also this Compilation
syntax is different only in webpack v5.
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.
That was my first thought too, but we'll lose backward compatibility with v3 and lower, and I'm not 100% that we should support them also? And also this
Compilation
syntax is different only in webpack v5.
Compatibility is stated by:
"peerDependencies": {
"webpack": ">=4.0.0 < 6.0.0"
},
html-webpack-plugin/package.json
Line 64 in 115bd8a
"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.
I've one more idea to pick major v5
and higher like:
webpackMajorVersion >= 5 ? ... : ...
What do you think?
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.
I was more looking to how it was written in file-watcher-api.js
.
module.exports = webpackMajorVersion === 4 |
Hi @jantimon can you please check this PR? 🙏 |
Released as 4.4.0 - sorry for the delay |
#1408
What I did:
mainTemplate.getAssetPath
, andgetPublicPath
)I also consider to put this
webpackMajorVersion
, as a helper somewhere - is quite repeated few times. Feedback will be needed.