LimitChunkCountPlugin breaks projects that use WASM imports
See original GitHub issueBug 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.
- Clone https://github.com/Jules-Bertholet/wasm-chunk-test
- Run
yarn
thenyarn start
- Open browser console, you should see
Hello World!
- Now uncomment the
LimitChunkCountPlugin
lines inwebpack.config.js
, and runyarn start again
- 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:
- Created 2 years ago
- Comments:7 (5 by maintainers)
Top 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 >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 FreeTop 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
Top GitHub Comments
It means you always need extra chunk for WebAssembly, so LimitChunkCountPlugin is working as expected, just do not output the error/warning
Answered