Skip to content
This repository has been archived by the owner on Jan 21, 2021. It is now read-only.

Plugin could not be registered at 'html-webpack-plugin-before-html-processing'. Hook was not found. #86

Open
wind4gis opened this issue Dec 26, 2018 · 8 comments

Comments

@wind4gis
Copy link

I'm using CRA which using "html-webpack-plugin": "4.0.0-alpha.2"
When I write it on my package.json
snipaste_2018-12-26_16-11-20
However, it shows error
snipaste_2018-12-26_16-12-57

is the plugin don't support webpack4???

@phetw
Copy link

phetw commented Jan 16, 2019

the current version of this package does not work with html-webpack-plugin v4
Please refer this issue

or

you can try yarn add preload-webpack-plugin@3.0.0-beta.3

@Tim-ls
Copy link

Tim-ls commented Jan 18, 2019

I have same error.

@guirip
Copy link

guirip commented Feb 20, 2019

Same error for me when using

"preload-webpack-plugin": "^2.3.0"

.
If I add v3.0.0-beta.1 (which is the most recent release indicated here), then I get an error about missing module @babel/runtime/core-js/get-iterator despite I have the dependency "@babel/runtime": "^7.2.0"
.

Finally what worked is:

npm install --save-dev preload-webpack-plugin@3.0.0-beta.3

Thanks @rappad for the issue link above.

@indusoni
Copy link

indusoni commented Mar 1, 2019

@guirip
Yes with preload-webpack-plugin@3.0.0-beta.3 ,its building successfully,but its not adding perload/prefetch .
config for this is like below mentioned
new PreloadWebpackPlugin({
rel: 'preload',
include:['main','vendor']
}),

Webpack version : 4.28.3

@leifj
Copy link

leifj commented Oct 5, 2019

fwiw 3.0.0-beta.3 worked for me and generated links

@eugenmihailescu
Copy link

Yes, 3.0.0-beta.3 worked for me too

@iampava
Copy link

iampava commented Jun 7, 2020

Interesting... It didn't work for me so I found a workaround using HTMLWebpackPlugin:

<link rel="preload" href="<%= compilation.getAssets().find(asset => /Roboto[.].+[.]woff2/.exec(asset.name)).name %>" as="font" type="font/woff2" crossorigin>

@tmladek
Copy link

tmladek commented Aug 27, 2020

Confirming, same error, specifying 3.0.0-beta.3 fixed the issue.

Looking forward to when it's not a beta! (:

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants