Hi,
First of all, I want to say great work for this plugin and thanks for the webpack 4 support 馃憤.
For the context, I want to use webpack 4 for my tool create-cozy-app, but I still have an issue with this plugin.
Using the last version of html-webpack-plugin 3.0.3 and webpack 4.1.2, I still have an issue about a not found hook.
Plugin could not be registered at 'html-webpack-plugin-before-html-generation'. Hook was not found.
BREAKING CHANGE: There need to exist a hook at 'this.hooks'. To create a compatiblity layer for this hook, hook into 'this._pluginCompat'.
Thanks by advance.
The new compilation hooks for Webpack 4 are:
htmlWebpackPluginAlterChunkshtmlWebpackPluginBeforeHtmlGenerationhtmlWebpackPluginBeforeHtmlProcessinghtmlWebpackPluginAlterAssetTagshtmlWebpackPluginAfterHtmlProcessinghtmlWebpackPluginAfterEmitStill working my way through the new Webpack 4 plugin world one console.log() at a time myself, but it seems you (or your html-webpack-plugin-hook-using dependencies) need to do something like this to use the new hooks:
function myPlugin() {
this.hooks.compilation.tap('myPlugin', compilation => {
compilation.hooks.htmlWebpackPluginBeforeHtmlProcessing.tapAsync('myPlugin', (data, cb) => {
// Do stuff
cb()
})
})
}
Exactly that's the new webpack plugin system
Ok, my bad, I wasn't looking at the right place.
I did actually have this issue due to the svg-sprite-loader usage on my side.
Sorry for the noise and thank you for taking time to reply my question @insin and @jantimon 馃憤
I close this issue.
Hi, sorry, i also have this issue and can't see an answer on this thread on how to resolve it?
馃啓
The reason for this issue is a incompatible plugin or loader.
As I don't know which incompatible loader you installed I don't know why it is generating the error.
But if you knew the plugin or loader which is not compatible to the Webpack 4 plugin system it would be better to let the author knew instead of posting it here :)
yes, you are right! I fixed this problem :) the problem is in FaviconsWebpackPlugin
@kotchuprik
How did you fix it. Since i have the same issue after upgrading to webpack 4.
Webpack is using the official nodejs depreacte util:
https://nodejs.org/api/util.html#util_util_deprecate_function_string
Add process.traceDeprecation = true; to your webpack config to see details about the reason for that warning.
@4iAmAve my problem was in old version of FaviconsWebpackPlugin
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Most helpful comment
The reason for this issue is a incompatible plugin or loader.
As I don't know which incompatible loader you installed I don't know why it is generating the error.
But if you knew the plugin or loader which is not compatible to the Webpack 4 plugin system it would be better to let the author knew instead of posting it here :)