-
Notifications
You must be signed in to change notification settings - Fork 585
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
使用模块联邦共享组件,子应用的window指向父应用的window #1003
Comments
关于window指向问题,这边定位到问题了:
这里的问题是:子应用的 目前的解决办法是,在子应用的 <script>
window.webpackChunkvue2 = undefined;
</script> |
@bailicangdu ,请问下关于这个window的指向问题,是算bug还是feature |
with沙箱实现机制导致子应用没有的全局变量会兜底到浏览器window上查找 |
可以对兜底逻辑做拦截吗?感觉这样没有严格沙箱化 |
可以通过插件系统针对特定变量进行严格隔离,例如: microApp.start({
plugins: {
global: [{
scopeProperties: ['webpackChunkvue2']
}]
}
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
问题描述
webpack
模块联邦共享组件,子应用的window指向父应用的window;复现步骤
上传截图
复现仓库
https://github.com/Cybbin/microapp-test
环境信息
The text was updated successfully, but these errors were encountered: