ScriptExternalLoadError: Loading script failed

Viewed 1510

I am getting this error message :ScriptExternalLoadError: Loading script failed.

(missing: http://localhost:3005/remoteEntry.js).

when trying to load a remote app from the container app in development.

I have this optimization (when I put them in comment everything works) :

optimization:{
  runtimeChunk: 'single',
  splitChunks: {
    chunks: 'all',
    cacheGroups: {
      vendor: {
        test: /[\\/]node_modules[\\/]/,
        name: module => (module.context.match(/[\\/]node_modules[\\/](.*?)([\\/]|$)/) || [])[1]
      }
    }
  },
1 Answers

Because the runtime.js was be split into a separate chunk, but your remoteEntry.js need it. So you can comment the runtimeChunk: 'single', or you can see this solution: concat-runtime

Related