Implemented Module Federation for Host and Remote Application. For the Remote application, federated module is uploaded on a CDN. While accessing the federated module on localhost, Host application is working fine but while accessing the module using CDN link, getting an error. Error exists during Lazy Loading of the federated module:
Uncaught ChunkLoadError: Loading chunk 531 failed.
Below is my module federation configuration in webpack (Host app):
**new ModuleFederationPlugin({
name: 'common',
filename: 'common',
remotes: {
sampleAppModule: sampleApp@http://CDN-link/remoteEntry.js
// sampleAppModule: sampleApp@http://localhost:8000/remoteEntry.js (this works fine)
},
shared: [sharedDependencies],
})**
Able to see the federated module on CDN link by directly accessing it. Also, successfully getting 200 status while fetching remoteEntry.js file but error comes when lazy loading the remote module.
