vite-plugin-federation
vite-plugin-federation copied to clipboard
@vitejs/plugin-legacy一起用,引用远程入口文件报错
相关依赖版本
- vite-plugin-federation: v1.1.7
- vite: v3.0.9
- @vitejs/plugin-legacy:v2.0.1
复现demo
https://stackblitz.com/edit/github-kyokdx-u2bdcf?file=readme.md,app2%2Fvite.config.js,app2%2Fdist%2Fassets%2FremoteEntry-legacy.js
复现步骤: 1.安装相关依赖 2.进入app2目录 3.yarn build
问题描述
打包出来的入口文件remoteEntry-legacy.js异常

1和2.地址和不用@vitejs/plugin-legacy情况下不一样 3.这个地方会报e.forEach is not a function
看起来是代码的替换冲突了,也许需要调整下插件的执行顺序。
碰到了类似的问题
报错意思大概是是代码分离后,plugin-legacy找不到对应的chunk了
@flyfishzy @ruleeeer help~
大佬们有解决吗,我这边也遇到了这个问题
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
Have you guys solved it? I also encountered this problem here.
新版本解决了这个问题吗?
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
Does the new version resolve this issue?