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

Cannot read property 'tap' of undefined #15

Open
Redirts opened this issue Feb 8, 2021 · 4 comments
Open

Cannot read property 'tap' of undefined #15

Redirts opened this issue Feb 8, 2021 · 4 comments

Comments

@Redirts
Copy link

Redirts commented Feb 8, 2021

Tried to replace old preload-webpack-plugin in my webpack 5 config with this fork and I'm getting this error:

compilation PreloadPlugin[webpack-cli] TypeError: Cannot read property 'tap' of undefined
at C:\node_modules@vue\preload-webpack-plugin\src\index.js:115:65
at Hook.eval [as call] (eval at create (C:\node_modules\tapable\lib\HookCodeFactory.js:19:10), :200:1)
at Hook.CALL_DELEGATE [as _call] (C:\node_modules\tapable\lib\Hook.js:14:14)
at Compiler.newCompilation (C:\node_modules\webpack\lib\Compiler.js:993:26)
at C:\node_modules\webpack\lib\Compiler.js:1035:29
at Hook.eval [as callAsync] (eval at create (C:\node_modules\tapable\lib\HookCodeFactory.js:33:10), :20:1)
at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (C:\node_modules\tapable\lib\Hook.js:18:14)
at Compiler.compile (C:\node_modules\webpack\lib\Compiler.js:1030:28)
at C:\node_modules\webpack\lib\Watching.js:112:19
at Hook.eval [as callAsync] (eval at create (C:\node_modules\tapable\lib\HookCodeFactory.js:33:10), :32:1)

Webpack plugin config:

plugins: [
new DefinePlugin({
"process.env": "{}"
}),
new ProgressPlugin(),
new HtmlWebPackPlugin({
template: "./src/index.html",
filename: "./index.html",
}),
new PreloadWebpackPlugin({
rel: "preload",
include: "allAssets",
fileBlacklist: [/.(js|ttf|png|eot|jpe?g|css|svg)/],
}),
],

@haoqunjiang
Copy link
Member

haoqunjiang commented Feb 10, 2021

@mririgoyen
Copy link

I'm also seeing this issue on the 1.1.2 version (using that because of Preact's use of the 3.x branch of HtmlWebpackPlugin. However, I'm not using include: 'allAssets'.

@iMakedonsky
Copy link

Same as @goyney – using 1.1.2 + include: 'initial' – same issue.

@carlzogh
Copy link

carlzogh commented Dec 9, 2022

Same issue in 2.0.0

Cannot read property 'tap' of undefined

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

No branches or pull requests

5 participants