feat: support modify babel deco plugin opts #11115
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
resolve #11103
背景
目前几个信息如下:
ecma 官配 deco 虽然已经正式出台,但功能是超级阉割版,与 TS deco 相比十分逊色。
目前 esbuild 对此持观望态度,没有实施计划( esbuild does not support method decorators in class expressions evanw/esbuild#3045 (comment) 、Feature request: Decorators support evanw/esbuild#104 )
目前 swc 对此只是有了实施,但未开放 api ( Finish auto accessor and stage 3 decorator swc-project/swc#7193 、 Road to spec decorator swc-project/swc#5053 (reply in thread) )
做法
所以我们先把 deco 配置项放出来,但不做过多的假定。