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.

Exposed modules stops working with default webpack 5 optimizations runtimeChunk: 'single'

See original GitHub issue

By 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: image

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:32 (9 by maintainers)

github_iconTop GitHub Comments

3reactions
jacob-ebeycommented, Jan 23, 2021

@Guriqbal-Singh-Alida @maraisr said he would look into it. We are scattered throughout the world though and have day jobs, please be patient. 😄

2reactions
jacob-ebeycommented, Jan 26, 2021

@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

Read more comments on GitHub >

github_iconTop 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 >

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