faceyspacey / faceyspacey/extract-css-chunks-webpack-plugin
Support HMR in Webpack 5?
- Dominant language
- JavaScript
- Stars
- 693
- Forks
- 83
- PR merge metrics
- No merged PRs in 30d
Description
Any chance of updating HMR to work in Webpack 5?
This is the error being thrown when using HMR with webpack-dev-server:
```
TypeError: Cannot read property 'getModuleIndex2' of undefined
at ExtractCssChunksPlugin.renderContentAsset (.../node_modules/extract-css-chunks-webpack-plugin/dist/index.js:312:27)
at Object.render (.../node_modules/extract-css-chunks-webpack-plugin/dist/index.js:172:32)
at .../node_modules/webpack-5/lib/HotModuleReplacementPlugin.js:380:32
at Hook.eval [as callAsync] (eval at create (.../node_modules/webpack-5/node_modules/tapable/lib/HookCodeFactory.js:33:10), :9:1)
at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (.../node_modules/webpack-5/node_modules/tapable/lib/Hook.js:18:14)
at cont (.../node_modules/webpack-5/lib/Compilation.js:1913:32)
at .../node_modules/webpack-5/lib/Compilation.js:1956:8
at .../node_modules/neo-async/async.js:2830:7
at Object.each (.../node_modules/neo-async/async.js:2850:39)
at Compilation.createChunkAssets (.../node_modules/webpack-5/lib/Compilation.js:2693:12)
```
It's essentially the same issue as webpack-contrib/mini-css-extract-plugin#487 which has been ignored for half a year. It would be pretty great if there was an alternative that the community could actually use for HMR in Webpack 5.
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the failure with Webpack 5 and webpack-dev-server, then inspect dist/index.js at the reported lines 172 and 312. Compare the behavior with webpack-contrib/mini-css-extract-plugin#487; done means HMR works without the getModuleIndex2 error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 32/100