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-cli/src/build.js的configDir引入前置导致config/index获取process.env.NODE_ENV为undefined #2211

Merged
merged 1 commit into from
Feb 20, 2019

Conversation

lms-sam
Copy link
Contributor

@lms-sam lms-sam commented Feb 19, 2019

问题描述
configDir引入前置导致config/index获取process.env.NODE_ENV为undefined.模板为例子,配置只输出production环境

复现步骤
npm run build:weapp
npm run dev:weapp
配置只输出production配置

// 这里可以贴代码

期望行为
对应命令钩子输出对应构建配置

报错信息

[这里请贴上你的完整报错截图或文字]

系统信息

Taro CLI 1.2.13 environment info:
System:
OS: macOS 10.14
Shell: 5.3 - /bin/zsh
Binaries:
Node: 11.1.0 - /usr/local/bin/node
Yarn: 1.12.3 - /usr/local/bin/yarn
npm: 6.4.1 - /usr/local/bin/npm

补充信息
[可选]
下面有修改代码

@lms-sam lms-sam changed the title taro-cli/src/build.js taro-cli/src/build.js的configDir引入前置导致config/index获取process.env.NODE_ENV为undefined Feb 19, 2019
@luckyadam luckyadam merged commit fe8c12e into NervJS:master Feb 20, 2019
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

Successfully merging this pull request may close these issues.

2 participants