Replies: 2 comments
-
我的看法:
My opinions:
|
Beta Was this translation helpful? Give feedback.
0 replies
-
非常赞同 @tonywu6 的观点,不过第一个要问题要考虑到 umd 包能否在旧版本的 chrome 上能否跑起来。 |
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
-
tl;dr
⭐️ 收集 IE 11 的使用场景以及遇到的缺陷(涉及的功能及代码示例),收集和浏览器支持相关的看法和建议 ⭐️
⭐️ We are collecting use cases in IE 11 (and other legacy browsers), issues you've encountered, and your opinions/suggestions on enabling better cross-browser compatibility. ⭐️
目前我们在代码打包的过程中仅仅使用
tsc
将 JavaScript 的代码格式转译成我们期望支持的最低 ECMAScript 版本(目前是 ES5),而没有使用如 Babel 的工具将其进一步转化成跨浏览器支持的代码。这意味着我们没有办法明确定义 X6 支持哪一些浏览器,也没有办法在文档中提供这一信息。转译的缺失导致了相当数量的浏览器兼容 issue (大部分来自 IE)
我们在 v2.0 版本中,极有可能会在 rollup 打包过程中引入
@babel/preset-env
来进行跨浏览器支持,并且使用 browserslist 来限定我们支持的浏览器版本。可以讨论的两个问题是:
Currently, our build process only transforms our scripts' JavaScript syntax to the minimum ECMAScript version that we wish to support (currently ES5) using
tsc
. We do not transform our code using cross-browser transpiling tools such as Babel. This means we cannot determine or document precisely which browsers we support.A bunch of issues were opened because of this lack of tooling (unsurprisingly most of them were about Internet Explorer):
As part of out v2.0 rewrite, we are likely to introduce Babel into our rollup workflow, allowing us to generate code that is guaranteed to work in a defined list of browser versions via
@babel/preset-env
.The following questions are then to be resolved:
EDIT: add tl;dr
Beta Was this translation helpful? Give feedback.
All reactions