-
-
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
feat(hooks): Provide static getHook method for access to all html-webpack-plugin hooks #995
Conversation
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.
Looks fine! But I don't like getHook
function. I prefer static code.
…pack-plugin hooks BREAKING CHANGE: The html-webpack-plugin doesn't add its hooks to the compilation object anymore
59c8e8f
to
4a96a9c
Compare
Okay changed it to getHooks - will rename it again to |
This feels like a great change, in my opinion. The access to hooks feels much cleaner. |
hooks.htmlWebpackPluginAfterEmit = new AsyncSeriesWaterfallHook(['pluginArgs']); | ||
function createHtmlWebpackPluginHooks () { | ||
return { | ||
htmlWebpackPluginBeforeHtmlGeneration: new AsyncSeriesWaterfallHook(['pluginArgs']), |
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.
You should consider removing the htmlWebpackPlugin
prefix, as it's now already namespace via getHooks
.
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'll take a look
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Export all hooks static and typed similar to webpack/webpack#7672
cc @ooflorent