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

chore: modify the babel configuration #6532

Merged
merged 2 commits into from
May 7, 2023

Conversation

gongshun
Copy link
Contributor

@gongshun gongshun commented May 5, 2023

按照文档和这个 babel 配置,打包后的组件代码应该是不需要转 es6 代码的,但是实际上是转换了

image

如果不配置 @babel/preset-env 的 targets ,就会使用 package.json 中 browserslist 字段,此时打包后的代码就是正确的(无需转换 es6 的代码)

参考 https://github.com/ant-design/antd-tools/blob/6d4722ad12e46148bbc1b0656072c1c3e4b5cdf8/lib/getBabelCommonConfig.js#L31

@tangjinzhou tangjinzhou merged commit 1deefa8 into vueComponent:main May 7, 2023
@gongshun gongshun deleted the patch-1 branch May 8, 2023 01:36
Copy link

github-actions bot commented May 8, 2024

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 8, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants