core icon indicating copy to clipboard operation
core copied to clipboard

runtime & sdk shared

Open userxiaya opened this issue 1 year ago • 4 comments

Describe the bug

打包后 @module-federation/ 里的 这两个包会放进remote.js里并且这两个包体积较大,且无法设置 shared 设置后会报错 希望这两个包可以设置共享

Reproduction

15

Used Package Manager

npm

System Info

rsbuild+vue3 @module-federation/echanced0.7.7

Validations

userxiaya avatar Nov 27 '24 02:11 userxiaya

找到折中方案了 在output 的 externals 里设置不打包然后在基座app里把当前插件设置进window即可

userxiaya avatar Nov 27 '24 06:11 userxiaya

https://github.com/module-federation/core/pull/3154

ScriptedAlchemy avatar Dec 03 '24 22:12 ScriptedAlchemy

@userxiaya i think the best way to solve this, is to upgrade your moduel-federation plugin to the latest version and use the externalRuntime and the provideExternalRuntime config in experiments to get this effect. you can check the doc here

danpeen avatar Jan 23 '25 08:01 danpeen

Stale issue message

github-actions[bot] avatar Mar 24 '25 15:03 github-actions[bot]