Exposed modules stops working with default webpack 5 optimizations runtimeChunk: 'single'
See original GitHub issueBy adding following to optimizations in webpack config, the exposed module stops working in dependent apps.
splitChunks: {
chunks: 'all',
},
runtimeChunk: 'single'
Output error in module consumer app:
Issue Analytics
- State:
- Created 3 years ago
- Comments:32 (9 by maintainers)
Top Results From Across the Web
Optimization - webpack
Tells webpack to find segments of the module graph which can be safely concatenated into a single module. Depends on optimization.
Read more >webpack 4 exports are not being exposed as configured
The solution appeared to be to set optimization.runtimeChunk = "single" , which would tell webpack to share the runtime across all chunks.
Read more >How to Build a Micro Frontend with Webpack's Module ...
Resolves Dependency Issues. Federated code defines their dependencies and if Webpack can't find it in the scope, will download it. Module ...
Read more >How to Build a Micro Frontend with Webpack's Module ... - Bitovi
Expose any code from any application that Webpack supports. Environment-Independent. Use shared code in different environment web, Node.js etc.
Read more >Output - Webpack 5 - W3cubDocs
output.asyncChunks. boolean = true. Create async chunks that are loaded on demand. webpack.config.js module.exports = { // ...
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
@Guriqbal-Singh-Alida @maraisr said he would look into it. We are scattered throughout the world though and have day jobs, please be patient. 😄
@Guriqbal-Singh-Alida Please keep that repo up as is if possible until the plugin can be documented somewhere else. Good job on finding a fix 🎉
For others, this is a plugin that merges the runtimes to get around runtimeChunk: single https://github.com/Guriqbal-Singh-Alida/basic-remote-runtime-single/blob/master/apps/app2/plugins/moduleFedSingleRuntime.js