Closed yyyyffqqqq closed 1 month ago
主应用ice.config.mts设置分包,微应用ice.config.mts不设置codeSplitting: false,主应用加载微应用会报错 Uncaught ChunkLoadError
希望能正常加载分包的微应用
No response
"@ice/app": "3.4.8"
getApps配置
{ name: 'sync', activePath: '/sync', sandbox: true, cached: false, loadScriptMode: 'fetch', scriptAttributes: ['crossorigin=anonymous'], entry: 'http://localhost:3002/sync/index.html', },
已经在找到找到解决方法了,第一个问题的解决方法(点击跳转):
微应用使用分包作为打包,需要在ice.config.mts配置时,加上特定域名 publicPath: ${process.env.ICE_PUBLIC_PATH}/, devPublicPath: http://localhost:3002${process.env.ICE_PUBLIC_PATH}/,
${process.env.ICE_PUBLIC_PATH}/
http://localhost:3002${process.env.ICE_PUBLIC_PATH}/
Describe the bug
主应用ice.config.mts设置分包,微应用ice.config.mts不设置codeSplitting: false,主应用加载微应用会报错 Uncaught ChunkLoadError
Expected behavior
希望能正常加载分包的微应用
Actual behavior
No response
Version of ice.js
"@ice/app": "3.4.8"
Content of build.json or ice.config.mts
No response
Additional context
getApps配置
No response