Replies: 1 comment
-
已经在这个 pr 中处理了,#379 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
目前 garfish 加载子应用时不支持解析 ESM 语法,子项目使用 unbundle 方案时 provider 方法获取不到,我这边的解决方法是将 provider 函数的导出方式改造一下,例如在入口 html 中加入这段代码
但这样还有一个问题,就是
unbundle
工具一般会在 window 下设置很多全局变量以及热更新相关的方法,garfish 在运行子应用的 js 时用沙箱屏蔽了修改 window 的操作,导致子应用运行出错,目前我用window = (0,eval)('window')
来实现了沙箱逃逸,我这边的项目已经正常运行了,不过由用户自己来写看起来有些 hack, 希望 gar 自己来做这步全局变量设置的操作或者提供个获取真实 window 对象的方法。Beta Was this translation helpful? Give feedback.
All reactions