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

打包代码后存在 es6 语法 导致低版本机型不可用 #9224

Closed
LengYXin opened this issue Apr 28, 2021 · 2 comments
Closed

打包代码后存在 es6 语法 导致低版本机型不可用 #9224

LengYXin opened this issue Apr 28, 2021 · 2 comments
Labels
F-react Framework - React T-weapp Target - 编译到微信小程序 V-3 Version - 3.x

Comments

@LengYXin
Copy link
Contributor

相关平台

微信小程序

小程序基础库: 2.16.0
使用框架: React

复现步骤

编译打包
image

期望结果

打包后代码中存在 const

实际结果

没有es6语法

环境信息

Taro CLI 3.2.1 environment info:
    System:
      OS: macOS 11.2.3
      Shell: 3.2.57 - /bin/bash
    Binaries:
      Node: 12.18.3 - ~/.nvm/versions/node/v12.18.3/bin/node
      Yarn: 1.22.10 - ~/.nvm/versions/node/v12.18.3/bin/yarn
      npm: 7.5.6 - ~/.nvm/versions/node/v12.18.3/bin/npm
    npmPackages:
      babel-preset-taro: 3.1.4 => 3.1.4 
@taro-bot2 taro-bot2 bot added F-react Framework - React T-weapp Target - 编译到微信小程序 V-3 Version - 3.x labels Apr 28, 2021
@luckyadam
Copy link
Member

可以自己配置 compile,把 node_modules 里的资源再用 babel 处理一遍

@LengYXin
Copy link
Contributor Author

可以自己配置 compile,把 node_modules 里的资源再用 babel 处理一遍

好的~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
F-react Framework - React T-weapp Target - 编译到微信小程序 V-3 Version - 3.x
Projects
None yet
Development

No branches or pull requests

2 participants