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

请教下如何在taro中使用Optional Chaning ES9语法特性 #5017

Closed
edwards19900128 opened this issue Dec 6, 2019 · 5 comments
Closed
Assignees

Comments

@edwards19900128
Copy link

问题描述

感谢优秀的框架开源出来使用
写业务代码的时候非常想使用Optional Chaning特性去判断非空,但是按照说明中使用babelrc文件中定义过去 Taro会编译失败,请教一下如何配置babel在taro中

@taro-bot
Copy link

taro-bot bot commented Dec 6, 2019

欢迎提交 Issue~

如果你提交的是 bug 报告,请务必遵循 Issue 模板的规范,尽量用简洁的语言描述你的问题,最好能提供一个稳定简单的复现。🙏🙏🙏

如果你的信息提供过于模糊或不足,或者已经其他 issue 已经存在相关内容,你的 issue 有可能会被关闭。

Good luck and happy coding~

@shenghanqin
Copy link
Collaborator

@edwards19900128 我猜很大的可能有以下的
1、Optional Chaning是TS上推动的,而TS在react、taro上可能支持速度并不快吧。
2、1.xx.xx上的编译是自研的,2.0.0 beta之后的版本是基于webpack的,也就是说,新特性的编译可能会更好配置。我建议你可以在beta中测试这个功能,并给我们提issue或者修改建议,感谢。

@taro-bot
Copy link

taro-bot bot commented Dec 8, 2019

CC @luckyadam

@Chen-jj Chen-jj closed this as completed Feb 20, 2021
@Chen-jj
Copy link
Contributor

Chen-jj commented Feb 20, 2021

Taro3 已支持

1 similar comment
@Chen-jj
Copy link
Contributor

Chen-jj commented Feb 20, 2021

Taro3 已支持

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

No branches or pull requests

4 participants