extract-css-chunks-webpack-plugin: this[MODULE_TYPE] is not a function
TypeError: this[MODULE_TYPE] is not a function
under version 4.x
when used in a node build process akin to https://github.com/nozzle/react-static/blob/master/packages/react-static-plugin-css-modules/src/node.api.js (despite updating the API as noted in the changelog)
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 8
- Comments: 20
Any update on this one, please? Same issue.
Was this ever resolved? I am still getting this issue as well
Please re-open this, the latest version is very broken.
https://github.com/aendrew/extract-css-chunks-webpack-plugin-162
I use sass-loader in this repro because that was my original error case but it still yields the same error if you comment it out.
Edit: This might be more an issue with my React SSR setup/
html-webpack-plugin
because the same issue also seems to occur withmini-css-extract-plugin
if I import a child stylesheet anywhere. If I import only inclient/index.js
(which avoidshtml-webpack-plugin
) everything seems to work… Please let me know if I should open a new issue about this specifically.Can anyone help me how to fix TypeError: Class constructor HookCodeFactory cannot be invoked without ‘new’
This is happening in production
“webpack”: “~4.25.1”
Webpack.config
Also having the same issue.
I’ll take a look and consult with some webpack authors. Thanks for bringing this to my attention
https://github.com/webpack-contrib/mini-css-extract-plugin/issues/73
I appreciate it. Any help you have. You helped me earlier by creating the React Static plugin so I appreciate any insight.