When using MiniCssExtractPlugin
with css modules and typescript packages, there can be an issue where the modules have a dependency that never completes processing as it cannot be picked up - i.e. _activeTasks === _parallelism
in webpack Compilation.js
.
This is ok for smaller projects, where the default parallelism
of 100 will hide the bug, but with many packages in large projects you can run into the issue consistently.
- Clone repo and install dependencies
- Run
yarn test
, notice that it will never complete (stalls at 28%) - Take a look at
webpack.config.js
, you can toggle eitherparallelism
orexperimentalUseImportModule
and re-runyarn test
and notice it works. - Run
yarn clean
to remove the output and rebuild if necessary.