You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have simple and pretty much the default webpack configuration and just added Module Federation. Cases 3 & 4 are not working with Module Federation. its throwing following error
ScriptExternalLoadError: Loading script failed.
(missing: http://localhost:4202/remoteEntry.js)
while loading "." from 499
at 499 (remoteEntry.js":1:1)
at __webpack_require__ (bootstrap:19:1)
at initExternal (sharing:27:1)
at __webpack_require__.I (sharing:38:1)
at Object.init (container-entry:24:1)
at initFn (sharing:29:1)
at async Promise.all (:3000/index 0)
host webpack config
module.exports=(webpackConfigEnv,argv)=>{constorgName="pwc";constdefaultConfig=singleSpaDefaults({
orgName,projectName: "root-config",
webpackConfigEnv,
argv,disableHtmlGeneration: true,});constmergedConfig=merge(defaultConfig,{// modify the webpack config however you'd like to by adding to this objectplugins: [newHtmlWebpackPlugin({inject: false,template: "src/index.ejs",templateParameters: {isLocal: webpackConfigEnv&&webpackConfigEnv.isLocal,
orgName,},}),newModuleFederationPlugin({remotes: {'microapp': 'microapp@http://localhost:4201/remoteEntry.js'}})],});returnmergedConfig;};
We haven't made any plans to provide support for Module Federation, but if you figure this out please consider documenting and contributing this to the single-spa community! Thanks!
We are using Single SPA with Module Federation from last 1.5 year in our app, Similar like use case 3 in react (host-> react->react) working very well which is in production. Only one use case(3) it's not working. If that solved I'm happy to contribute to this community. I'm only 1 step ahead, if someone has extensive Module Federation knowledge can help here.
Context and Demonstration
I'm trying out all kinds of mixes and matches of Microfrontend. So, I created 4 apps, details are here.
Test Cases
Problem statement
I have simple and pretty much the default webpack configuration and just added Module Federation. Cases 3 & 4 are not working with
Module Federation
. its throwing following errorhost webpack config
microapp webpack config
parcel webpack config
The text was updated successfully, but these errors were encountered: