-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
babel转换不支持装饰器和泛型同时使用 #392
Labels
enhancement
New feature or request
Comments
这似乎是
还得再想想怎么做。 |
能不能通过写typescript的插件来实现不让Typescript转换装饰器。 不过感觉现在Taro的思路是自己先用babel转换了一次,注入部分代码,然后又用webpack打包一次,是不是必须这样这样的原理呢? |
yuche
added a commit
that referenced
this issue
Aug 1, 2018
@yuche 1.0.0-beta.5解决了类型报错问题但是编译的结果出问题了 |
@AlexStacker page 的 config 之外还有啥问题吗 |
Closed
暂时没发现,我尝试改了一下,提交了一个PR 在我这边可以顺利编译跑起来。 |
@yuche我那个pr实现的应该是有问题的,会把整个constructor给移除掉。 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
问题描述
自己增加了redux的typescript的类型定义文件,包含了装饰器和泛型,但是编译时报错,调试了一下应该是babel 无法解析的原因。
报错信息
期望行为
能正常编译
系统信息
补充信息
调试的结果是taro-transformer-wx插件里babel的transform没有正常转换ts代码,如果在使用babel转换之前用ts.transpileModule转换一下,把类型定义给去掉的话倒是可以编译通过,但是不知道是不是这样的过程。我把代码放到了了这里,可以拉取下来运行调试一下。
The text was updated successfully, but these errors were encountered: