-
Notifications
You must be signed in to change notification settings - Fork 209
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeError: Cannot read properties of undefined (reading '__GARFISH_EXPORTS__') #666
Comments
@zhoushaw 加上动态 import这段,前面 |
@festina-lente-z 是的,下面有加载就不需要重新设置了 |
👌 |
@yubignhua 动态 import 的话, |
@yubignhua main.ts不是子应用入口文件吧?main.ts你定义provider了吗? |
复现 demo
https://github.com/festina-lente-z/react-vite-garfish-demo/tree/feat/garfish-exports-undefined
问题
react子应用关闭沙箱,vite启动时,引入 rxjs 报错,但是打开沙箱引入 GarfishEsModule() 插件正常显示。报错如下图所示:
我自己这边进行排查之后,发现 rxjs 和 garfish 的 window 冲突了。
我在源码中加入了
console.log(window)
,代码如下当运行到 rxjs 内部时,打印的 window 与其他依赖不一致:
请问有比较好的解决方案吗?
Reproduction
https://github.com/festina-lente-z/react-vite-garfish-demo/tree/feat/garfish-exports-undefined
Used Package Manager
pnpm
System Info
Validations
The text was updated successfully, but these errors were encountered: