RuntimeIdRuntimeModule must be in a single runtime LimitChunkCountPlugin maxChunks 1
See original GitHub issueFor building a lib i want to disable codeSplitting with webpack
adding the LimitChunkCountPlugin
plugins: [
new webpack.optimize.LimitChunkCountPlugin({
maxChunks: 1,
}),
],
but get this error on build
ERROR in webpack/runtime/runtimeId
RuntimeIdRuntimeModule must be in a single runtime
Error: RuntimeIdRuntimeModule must be in a single runtime
at RuntimeIdRuntimeModule.generate (/home/arpu/Work/projects/vland_app/vland_app/node_modules/webpack/lib/runtime/RuntimeIdRuntimeModule.js:22:10)
at RuntimeIdRuntimeModule.getGeneratedCode (/home/arpu/Work/projects/vland_app/vland_app/node_modules/webpack/lib/RuntimeModule.js:182:44)
at RuntimeIdRuntimeModule.codeGeneration (/home/arpu/Work/projects/vland_app/vland_app/node_modules/webpack/lib/RuntimeModule.js:137:30)
at /home/arpu/Work/projects/vland_app/vland_app/node_modules/webpack/lib/Compilation.js:3324:22
at /home/arpu/Work/projects/vland_app/vland_app/node_modules/webpack/lib/Cache.js:93:5
at Hook.eval [as callAsync] (eval at create (/home/arpu/Work/projects/vland_app/vland_app/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:6:1)
at Cache.get (/home/arpu/Work/projects/vland_app/vland_app/node_modules/webpack/lib/Cache.js:75:18)
at ItemCacheFacade.get (/home/arpu/Work/projects/vland_app/vland_app/node_modules/webpack/lib/CacheFacade.js:111:15)
at Compilation._codeGenerationModule (/home/arpu/Work/projects/vland_app/vland_app/node_modules/webpack/lib/Compilation.js:3317:9)
at /home/arpu/Work/projects/vland_app/vland_app/node_modules/webpack/lib/Compilation.js:3224:11
without the plugin all works fine
node v14.19.0 webpack 5.69.1
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
LimitChunkCountPlugin max chunks not working for dynamic ...
Webpack 5 creates chunks even though maxChunks set to 1 only with 2 JS entry points # ... RuntimeIdRuntimeModule must be in a...
Read more >LimitChunkCountPlugin - webpack
LimitChunkCountPlugin can post-process your chunks by merging them. ... Limit the maximum number of chunks using a value greater than or equal to...
Read more >Webpack ignore chunking for production build - Stack Overflow
You can disable code splitting by limiting the max number of chunks to 1 with the LimitChunkCountPlugin : plugins: [ new webpack.optimize.
Read more >The Single Runtime Chunk > Webpack Encore - SymfonyCasts
Every single entry now includes a new file called runtime.js , which means that it's a new file that needs to be included...
Read more >How to disable Code Splitting in webpack | Glenn Reyes
LimitChunkCountPlugin ({ maxChunks: 1, }), ],};. With this, one single chunk/bundle will be created and voila: Code Splitting is disabled. So in ...
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
When you have
native support for Web Workers
, you always have more than 1 chunk… You can try:@alexander-akait For me, the error started popping up after I removed
worker-loader
in favor of Webpack 5’s native support for Web Workers. I am sure it’s caused due toLimitChunkCountPlugin
because disabling it causes builds to pass.