Webpack 5 support
See original GitHub issueFeature Proposal
Webpack is currently in v5.0.0-beta7. Can mini-css-extract-plugin be made compatible?
Feature Use Case
Mini-css-extract-plugin is essential to extract css via webpack.
At the moment I’m seeing the following error:
⬢ webpack: Module build failed (from node_modules/mini-css-extract-plugin/dist/loader.js):
TypeError: The 'compilation' argument must be an instance of Compilation
at Function.getCompilationHooks (/node_modules/webpack/lib/javascript/JavascriptModulesPlugin.js:115:10)
at compiler.hooks.thisCompilation.tap.compilation (node_modules/webpack/lib/node/NodeTemplatePlugin.js:33:42)
at Hook.eval (<anonymous>:7:1)
at Hook.CALL_DELEGATE [as _call] (node_modules/webpack/node_modules/tapable/lib/Hook.js:14:14)
at Compiler.newCompilation (node_modules/webpack/lib/Compiler.js:857:30)
at hooks.beforeCompile.callAsync.err (node_modules/webpack/lib/Compiler.js:898:29)
at Hook.eval [as callAsync] (<anonymous>:6:1)
at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (node_modules/webpack/node_modules/tapable/lib/Hook.js:18:14)
at Compiler.compile (node_modules/webpack/lib/Compiler.js:893:28)
at Compiler.runAsChild (node_modules/webpack/lib/Compiler.js:436:8)
at Object.pitch (node_modules/mini-css-extract-plugin/dist/loader.js:129:17)
Issue Analytics
- State:
- Created 4 years ago
- Reactions:7
- Comments:47 (21 by maintainers)
Top Results From Across the Web
Webpack 5 release (2020-10-10)
Webpack 5 adds support for some CommonJs constructs, allows to eliminate unused CommonJs exports and track referenced export names from require ...
Read more >facebook/create-react-app - Webpack 5 support overview
Overview of tasks needed for updating CRA to Webpack 5 - Some of the work will support both Webpack 4 + 5 but...
Read more >What's New in Webpack 5
What's new in Webpack 5 · Faster builds with persistent caching · Smaller bundle sizes · Better long term caching · Breaking changes...
Read more >Webpack 5 Adoption
Improved Long Term Caching of Assets: Deterministic code output that is less likely to change between builds; Improved Tree Shaking; Support for assets...
Read more >Upgrading Webpack 4 → 5 | Square Corner Blog
Webpack 5 Gains · Decreased bundle size by 27-28% · Decreased build time by 10% (2m 54s → 2m 36s) · Cached dev...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
The capitalisation issue mentioned by @stupidmonke was my problem too when running from Windows. My code lives in C:\Code\Personal… but I had done cd C:\code\Personal… and run
npm run build
from there. Doing cd with the correct capitalisation made the problem go away for me.I was having this same issue and it ended up being a capitalization issue with the file structure I was calling npm run watch from in the Terminal client in Visual Studio Code, so '/estimates/ instead of ‘/Estimates/’