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 init 项目模板中的 .env.(prod|dev) 与文档“模式和环境变量”中提及的默认模式 .env.(development|production) 不一致 #14968

Open
rgbahsl opened this issue Dec 11, 2023 · 0 comments
Labels
F-react Framework - React T-weapp Target - 编译到微信小程序 V-3 Version - 3.x

Comments

@rgbahsl
Copy link

rgbahsl commented Dec 11, 2023

相关平台

Taro CLI

小程序基础库: 无关联
使用框架: 无关联

复现步骤

taro init 的模板中提供了 .env.dev.env.prod 两个文件,但根据文档 模式和环境变量 所述,taro 默认的两个模式为 developmentproduction,如果使用者不对项目进行额外的配置,那么模板所提供的 .env.dev 与 .env.prod 不会起到任何作用,这可能对使用者造成一定的困惑。

期望结果

taro init 中的 .env.dev 与 .env.prod 应该变成 .env.development 和 .env.production

实际结果

如果使用者不对项目进行额外的配置,那么模板所提供的 .env.dev 与 .env.prod 不会起到任何作用

环境信息

  Taro CLI 3.6.20 environment info:
    System:
      OS: Windows 11 10.0.22631
    Binaries:
      Node: 16.17.1 - C:\Program Files\nodejs\node.EXE
      Yarn: 1.22.19 - C:\Program Files\nodejs\yarn.CMD
      npm: 8.15.0 - C:\Program Files\nodejs\npm.CMD
    npmPackages:
      @tarojs/cli: 3.6.20 => 3.6.20
      @tarojs/components: 3.6.20 => 3.6.20
      @tarojs/helper: 3.6.20 => 3.6.20
      @tarojs/plugin-framework-react: 3.6.20 => 3.6.20
      @tarojs/plugin-platform-alipay: 3.6.20 => 3.6.20
      @tarojs/plugin-platform-h5: 3.6.20 => 3.6.20
      @tarojs/plugin-platform-jd: 3.6.20 => 3.6.20
      @tarojs/plugin-platform-qq: 3.6.20 => 3.6.20
      @tarojs/plugin-platform-swan: 3.6.20 => 3.6.20
      @tarojs/plugin-platform-tt: 3.6.20 => 3.6.20
      @tarojs/plugin-platform-weapp: 3.6.20 => 3.6.20
      @tarojs/react: 3.6.20 => 3.6.20
      @tarojs/runtime: 3.6.20 => 3.6.20
      @tarojs/shared: 3.6.20 => 3.6.20
      @tarojs/taro: 3.6.20 => 3.6.20
      @tarojs/taro-loader: 3.6.20 => 3.6.20
      @tarojs/webpack5-runner: 3.6.20 => 3.6.20
      babel-preset-taro: 3.6.20 => 3.6.20
      eslint-config-taro: 3.6.20 => 3.6.20
      react: ^18.0.0 => 18.2.0
@taro-bot2 taro-bot2 bot added F-react Framework - React T-weapp Target - 编译到微信小程序 V-3 Version - 3.x labels Dec 11, 2023
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
Status: Todo
Development

No branches or pull requests

1 participant