-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
ts5中的新版decorators无法正常运行 #11103
Comments
由于缺乏足够的信息,我们暂时关闭了该 Issue。请修改(不要回复) Issue 提供最小重现以重新开启。谢谢。 |
目前没有计划支持官方标配 deco ,和 TS 的 deco 相比十分逊色,不推荐使用。 如有 deco 需求,可以使用 TS 标准的 deco 。 |
@fz6m 我使用的就是TS5.0新出的标准的deco,具体可以看这里:https://www.typescriptlang.org/docs/handbook/release-notes/typescript-5-0.html#decorators 源码 https://github.com/umijs/umi/blob/master/packages/babel-preset-umi/src/index.ts#L82 umi配置现在貌似也无法修改umi内置的babelOpts |
这里的就是 ecma 标准的官配 deco ,是原 TS deco 的超级阉割版本,功能上没有优势,目前没有计划支持。 |
umi新版已经支持ts5,ts5已经支持新版的decorators,但umi内置的babel插件还是老版的decorators。
手动在.umirc中引入新版的decorators插件
会报错,报错如下:
The text was updated successfully, but these errors were encountered: