question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Webpack 5 support

See original GitHub issue

Feature 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:closed
  • Created 4 years ago
  • Reactions:7
  • Comments:47 (21 by maintainers)

github_iconTop GitHub Comments

19reactions
richardlawleycommented, Dec 13, 2020

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.

13reactions
stupidmonkecommented, Dec 3, 2020

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/’

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found