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

【Q748】在 babel 编译为低版本 ES 时,为何能够编译可选链之类语法,但无法编译 API #794

Open
shfshanyue opened this issue Nov 12, 2022 · 1 comment

Comments

@shfshanyue
Copy link
Owner

No description provided.

@shfshanyue shfshanyue changed the title 【Q748】在 babel/typescript 编译为低版本 ES 时,为何能够编译可选链之类语法,那无法编译 Promise.any 之类 API 【Q748】在 babel 编译为低版本 ES 时,为何能够编译可选链之类语法,但无法编译 API Nov 12, 2022
@shfshanyue
Copy link
Owner Author

https://q.shanyue.tech/engineering/734.html

babel/swc 只能处理操作符,而无法处理新的 API。如果需要处理 API 兼容,则需要引入 core-js 增加垫片代码

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant