-
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-preset-taro 设置 useBuiltIns: 'usage' 会导致 @babel/preset-env 和 @babel/plugin-transform-runtime 都设置了core.js: 3.0, 导致编译报错 #9705
Comments
@wanqing19954 兜兜转转 debug 了半天,原来是 babel 使用 corejs 时把 Webpack buildin 的 有兴趣了解详情,可以看看这位老哥的回答:zloirock/core-js#743 解决办法正如上述链接所述,把 Anyway,我顺手把 基础教程 => 配置 => Babel 配置 |
@Chen-jj 3.3.5版本问题还存在,加了useBuiltIns: "usage",
|
@Chen-jj 3.3.19版本问题还存在,taro3 vue3 nutui-taro 加了useBuiltIns: "usage", npm run dev:h5 npm run dev:weapp 还会报这个错误。 |
还有问题的话新开一个 issue 并附上可复现代码吧。只看报错很难推测原因 |
相关平台
H5
复现仓库
https://github.com/wanqing19954/taro-vue/blob/dev/babel.config.js
浏览器版本: Chrome 62
使用框架: Vue 2
复现步骤
期望结果
希望设置 @babel/plugin-transform-runtime, envOptions corejs 选项默认为false, 可以编译成功
实际结果
目前设置useBuiltIn: 'usage' , npm run dev:h5 报错
环境信息
补充信息
问题和这个一样,可参考看下
zloirock/core-js#583,
Ok, let say in other words: you should use useBuiltIns option of preset-env OR corejs option of runtime, but not together.
The text was updated successfully, but these errors were encountered: