-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
[3.6.2] @taro/helper 中的 swc_plugin_define_config.wasm 插件对 app.config.js 文件的转换有影响 #13538
Comments
之前收到过反馈,怀疑是 swc 的版本问题导致需要再调查一下 |
感谢大佬回复。 |
遇到同样的问题,app.config.ts里不能用箭头函数~ |
我也遇到这个问题,问题产生的原因是重装了@taro/cli,但是项目里的node_modules没有没动过啊。 有rust的报错,路径也是感人“ /Users/chenjiajian/”,这是作者? |
我也是,项目跑不起来了,夭寿啊 |
我也遇到这个问题,请问大佬这个报错最终如何解决的? 有rust的报错,路径也是感人“ /Users/chenjiajian/”,这是作者? |
相关平台
微信小程序
复现仓库
https://github.com/TralafalgarV/bug-taro-swc-demo.git
小程序基础库: 2.12.3
使用框架: React
复现步骤
复现流程
安装依赖
修改 swc_plugin_define_config.wasm 绝对路径
修改
swc-register.js
文件的第 69 行代码,根据实际情况填写swc_plugin_define_config
插件的绝对路径执行命令
查看结果
查看 output.js 文件的第 93 行
从上面可以看出,app.config.js 文件被 swc 转换后,箭头函数内部的代码被清空了。
但是如果注释掉
swc-register.js
文件 第67 ~~ 72
行的swc_plugin_define_config.wasm
这个插件的话,输出的转换内容就是正常的,没有问题。结论
怀疑 swc_plugin_define_config.wasm 这个插件的实现有问题。
期望结果
通过 swc 转换的 app.config.js 文件,功能正常。
实际结果
通过 swc 转换的 app.config.js 文件,箭头函数中的代码被清空。
环境信息
The text was updated successfully, but these errors were encountered: