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 build never completes when using experimentalUseImportModule

See original GitHub issue

Bug report

Actual Behavior

In the sample project, it hangs indefinitely at 28%.

Expected Behavior

The project should build successfully. In the sample project, it should build successfully with parallelism: 1 and experimentalUseImportModule: true, but it does not.

How Do We Reproduce?

Please see the sample typescript project using css modules - https://github.com/wemyss/webpack-css-mini-extract-plugin-bug. This was the smallest working set of files I could reproduce the issue with (the dependency structure from the entry point is shown below). Note that I had to reduce paralellism from the default of 100 to 1 to demonstrate the issue with such a small project. Instructions to reproduce are in the readme in that repository.

index.ts  -> igloo.ts -> igloo.css -> forest.css -> color.css
         \--------> happy.css --------^

If you set experimentalUseImportModule to false, webpack will successfully generate the build.

Please paste the results of npx webpack-cli info here, and mention other relevant information

System: OS: macOS 11.6.1 CPU: (12) x64 Intel® Core™ i9-8950HK CPU @ 2.90GHz Memory: 1.28 GB / 32.00 GB Binaries: Node: 12.22.5 - /usr/local/bin/node Yarn: 1.22.11 - /usr/local/bin/yarn npm: 6.14.14 - /usr/local/bin/npm Browsers: Chrome: 96.0.4664.110 Firefox: 95.0.1 Safari: 15.1 Safari Technology Preview: 15.4 Packages: css-loader: ^5.2.4 => 5.2.7 ts-loader: ^9.2.3 => 9.2.6 webpack: ^5.54.0 => 5.65.0 webpack-cli: ^4.8.0 => 4.9.1 webpack-dev-server: ^4.6.0 => 4.6.0

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:3
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
alexander-akaitcommented, Dec 21, 2021

You can see this here buildQueue_entries_itemsInProcessingState_debugIds (two modules in progress)

1reaction
alexander-akaitcommented, Dec 20, 2021

Yep, looks like bug, anyway you don’t need experimentalUseImportModule, because it is enabled by default if webpack is supported it, regarding parallelism, we should fix it

Read more comments on GitHub >

github_iconTop Results From Across the Web

Webpack builds successfully, but hangs without exiting
I spawn the process via npm run build , the client.js is correctly built, but the webpack build process never terminates. webpack.
Read more >
MiniCssExtractPlugin - webpack
This plugin extracts CSS into separate files. It creates a CSS file per JS file which contains CSS. It supports On-Demand-Loading of CSS...
Read more >
Webpack production build never finishes on Windows (WSL)
Using the latest master, the webpack production build (yarn build) hangs on 92% chunk asset optimization UglifyJSPlugin. I'm on Windows 10 ...
Read more >
Webpack 5 Full Project Setup - YouTube
We'll start out creating a new Webpack 5 project, putting it on Github ... folder every build with clean- webpack -plugin - React...
Read more >
Keep webpack Fast: A Field Guide for Better Build Performance
The build tools of yore: a Loom with Jacquard machine attached ... of files) will never use import, require, or define statements, you...
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