speed-measure-webpack-plugin: TypeError: Cannot read property 'tap' of undefined
It seems that can’t work with webpack customed hooks such as html-webpack-plugin-before-html-processing in html-webpack-plugin, when we tap these events, the error occurred.
compilation.hooks.htmlWebpackPluginBeforeHtmlProcessing.tap(...
^
TypeError: Cannot read property 'tap' of undefined
About this issue
- Original URL
- State: open
- Created 6 years ago
- Reactions: 36
- Comments: 16 (2 by maintainers)
Facing the same issue, anyone any luck?
same proplem 1.create the project by vue/cli 2.add the webpack config file:
3.webpack --config webpack.test.config.js --mode production
result:
vue/cli@3.2.1 speed-measure-webpack-plugin@1.2.5
Cheers for raising 🙂
I’m struggling to repro this a bit. I gather it’s from plugins that work with the html-webpack-plugin, rather than that plugin working by itself
I’ve pushed a branch repro/html-webpack-plugin that includes a webpack config using html-webpack-plugin. You can see at the moment on that branch if you run
npm run prepare ; npm run test ; npm run cleanupfrom within the directory__tests__/setups/v4-html-webpack-pluginthat the tests all pass.Could you modify that branch to reproduce the issue you’re talking about?