hard-source-webpack-plugin
hard-source-webpack-plugin copied to clipboard
TypeError: Cannot read properties of undefined (reading 'tap')
When I use this plug-in in a business project, it works fine. But when I use it in the component library, I get an error.
tapable.hooks[name].tap(reason, callback);
^
TypeError: Cannot read properties of undefined (reading 'tap')
Operating System, Node, and NPM dependency versions
Mac OS 11.2.3
Node 16.12.0
"devDependencies": {
"webpack": "^5.11.0",
"webpack-bundle-analyzer": "^4.4.2",
"webpack-cli": "^4.2.0",
"webpack-dev-server": "^3.11.2",
"webpack-manifest-plugin": "^4.0.2"
}
+1
+2
+3
Ok. reverted to webpack4 and it works just fine
+4
+1
+1
++1
+1
+1
This is because Webpack 5.x is not supported (https://github.com/mzgoddard/hard-source-webpack-plugin/issues/546).
the same problems
@w-t-w Please refrain from posting these sort of "me too" or "+1" comments; you’re notifying 11 persons for nothing.