Skip to content

Cannot read property 'tap' of undefined #15

@Redirts

Description

@Redirts

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)/],
}),
],

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions