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.

LimitChunkCountPlugin breaks projects that use WASM imports

See original GitHub issue

Bug report

What is the current behavior? When LimitChunkCountPlugin is used with max chunks set to 1, projects that use WASM modules break.

If the current behavior is a bug, please provide the steps to reproduce.

  1. Clone https://github.com/Jules-Bertholet/wasm-chunk-test
  2. Run yarn then yarn start
  3. Open browser console, you should see Hello World!
  4. Now uncomment the LimitChunkCountPlugin lines in webpack.config.js, and run yarn start again
  5. Open browser console, there will be an error.

What is the expected behavior? LimitChunkCountPlugin does not break WASM projects.

Other relevant information: webpack version: 5.38.1 Node.js version: 14.7.0 Operating System: Fedora 34

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
alexander-akaitcommented, Jun 17, 2021

It means you always need extra chunk for WebAssembly, so LimitChunkCountPlugin is working as expected, just do not output the error/warning

0reactions
alexander-akaitcommented, Jun 17, 2021

Answered

Read more comments on GitHub >

github_iconTop Results From Across the Web

Webpack 5 breaks dynamic wasm import for SSR #25852
Using Webpack 5 breaks dynamic import for WASM modules when using SSR. ENOENT: no such file or directory, open '...\.next\server\static\wasm.
Read more >
Experiments | webpack
Because experimental features have relaxed semantic versioning and might contain breaking changes, make sure to fix webpack's version to minor e.g. webpack: ~ ......
Read more >
Wasm By Example
A hands-on introduction into WebAssembly ( Wasm ). Containing simple wasm examples and wasm tutorials on how to implement concepts and various tasks...
Read more >
What's Wrong with Web Assembly?. Does WASM have any ...
One of the major game development engines out there, it is capable of exporting your projects to be web compatible. And since 2018,...
Read more >
WebAssembly Concepts - MDN Web Docs
WebAssembly modules can be imported into a web (or Node.js) app, exposing WebAssembly functions for use via JavaScript. JavaScript frameworks ...
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