Skip to content

Commit

Permalink
fix(cli): 修复配置文件中读取不到 process.env.TARO_ENV 的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
luckyadam committed Dec 31, 2019
1 parent 4597d1a commit 121ba14
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/taro-cli/bin/taro-build
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ if (env) {
process.env.NODE_ENV = 'production'
}
}
process.env.TARO_ENV = type

const builder = new Builder(appPath)

if (ui) {
Expand Down Expand Up @@ -66,8 +68,6 @@ if (!fs.existsSync(projectConfPath)) {
process.exit(1)
}

process.env.TARO_ENV = type

const projectConf = require(projectConfPath)(_.merge)
if (typeof page === 'string') {
console.log(chalk.green(`开始编译页面 ${chalk.bold(page)}`))
Expand Down

0 comments on commit 121ba14

Please sign in to comment.