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

feat: support modify babel deco plugin opts #11115

Merged
merged 1 commit into from
Jun 15, 2023
Merged

Conversation

fz6m
Copy link
Contributor

@fz6m fz6m commented May 8, 2023

resolve #11103

背景

目前几个信息如下:

  1. ecma 官配 deco 虽然已经正式出台,但功能是超级阉割版,与 TS deco 相比十分逊色。

  2. 目前 esbuild 对此持观望态度,没有实施计划( esbuild does not support method decorators in class expressions evanw/esbuild#3045 (comment)Feature request: Decorators support evanw/esbuild#104

  3. 目前 swc 对此只是有了实施,但未开放 api ( Finish auto accessor and stage 3 decorator swc-project/swc#7193Road to spec decorator swc-project/swc#5053 (reply in thread)

做法

所以我们先把 deco 配置项放出来,但不做过多的假定。

@vercel
Copy link

vercel bot commented May 8, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
umi ⬜️ Ignored (Inspect) May 8, 2023 0:37am

@fz6m
Copy link
Contributor Author

fz6m commented Jun 13, 2023

同步一下最新的进展,目前 esbuild 开始着手准备推进 ecma 官方 deco ,并且将 “全部是 TS deco” 这一假定取消了,改为读取 tsconfig.json 中的 experimentalDecorators ,详见 esbuild v0.18.0

@sorrycc sorrycc merged commit 8208208 into umijs:master Jun 15, 2023
@fz6m
Copy link
Contributor Author

fz6m commented Jun 20, 2023

最新进展:esbuild v0.18.5 已实现 ecma deco

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.

ts5中的新版decorators无法正常运行
2 participants