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

polyfill #79

Open
lovelmh13 opened this issue Jun 16, 2021 · 0 comments
Open

polyfill #79

lovelmh13 opened this issue Jun 16, 2021 · 0 comments

Comments

@lovelmh13
Copy link
Owner

babel 的转换测试可以看官网这里:Try it out

polyfill 指的是 api 的 polyfill。

在 babel 中, polyfill 是需要单独设置 useBuiltIns 通过 corejs 来实现的(vue-cli 里不需要,cli3 默认使用 corejs 2 ,cli4 默认使用 corejs3)。

由于 vue-cli3 使用的是 corejs 2,所以有个大坑!! flat 不能被 polyfill。 flat 的 polyfill 是在 corejs3 中加入的

涉及到的还有 stage

image

剩下的暂时先看以下文章:

Babel 7 升级实践

不要肆无忌惮地在你的项目中使用 ES78910 了~

babel-preset-app#stage-3-or-below

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

No branches or pull requests

1 participant