Skip to content
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

✨ IE compatible #296

Merged
merged 3 commits into from
Mar 26, 2020
Merged

✨ IE compatible #296

merged 3 commits into from
Mar 26, 2020

Conversation

Deturium
Copy link
Contributor

@Deturium Deturium commented Mar 8, 2020

Checklist
  • npm test passes
  • tests are included
  • documentation is changed or added
  • commit message follows commit guidelines
Description of change

ref #182

1. IE 下需要主应用需要引入以下 polyfill

import 'core-js/stable/promise';
import 'core-js/stable/symbol';
import 'core-js/stable/string/starts-with';
import 'core-js/web/url';

不能使用 https://polyfill.io/ 提供的 fetch

2. 支持 proxy 沙箱自动退化为 snapshot 沙箱

是否更改 jsSandboxjsSandbox: boolean | 'proxy' | 'snapshot'
snapshot 应该是强制要求 singulartrue 的,无法支持多应用共存

给沙箱增加生命周期钩子方便调试 TODO

3. 需要增加 IE 的 test case TODO

  1. IE 下的 demo,现在只有 vue demo 是兼容到 IE 的
  2. snapshot 沙箱的一些 edge case 还没验证过

@kuitos kuitos changed the base branch from master to next March 9, 2020 09:51
@kuitos
Copy link
Member

kuitos commented Mar 9, 2020

是否更改 jsSandbox 为 jsSandbox: boolean | 'proxy' | 'snapshot'

配置保留 jsSandbox: boolean 的方式,自动根据 typeof Proxy === 'undefined' fallback 到 snapshot 沙箱,并给出一些 warning 信息。

snapshot 应该是强制要求 singular 为 true 的,无法支持多应用共存

singular 默认为 true,如果不支持 Proxy 的环境还被配置了 singular false, 直接警告或者报错

@kuitos kuitos added this to the 2.0 milestone Mar 10, 2020
src/sandbox/proxySandbox.ts Show resolved Hide resolved
Copy link
Member

@kuitos kuitos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kuitos kuitos merged commit bd23232 into next Mar 26, 2020
@kuitos kuitos deleted the ie-compatible branch March 26, 2020 13:04
kuitos pushed a commit that referenced this pull request Mar 26, 2020
kuitos pushed a commit that referenced this pull request Mar 29, 2020
kuitos pushed a commit that referenced this pull request Mar 29, 2020
@howel52 howel52 mentioned this pull request Jul 6, 2020
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature Request] compatible with IE
2 participants