Skip to content

Commit bac5877

Browse files
Merge pull request #144 from topcoder-platform/PROD-2145_build-var
PROD-2145 Replace APPENV with REACT_APP_HOST_ENV -> dev
2 parents 1ae88b7 + 6045466 commit bac5877

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

config/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
/* global process */
22

33
module.exports = (() => {
4-
const env = process.env.APPENV || "dev";
4+
const env = process.env.REACT_APP_HOST_ENV || "dev";
55

6-
console.info(`APPENV: "${env}"`);
6+
console.info(`REACT_APP_HOST_ENV: "${env}"`);
77

88
// for security reason don't let to require any arbitrary file defined in process.env
99
if (["prod", "dev"].indexOf(env) < 0) {

webpack.config.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,8 @@ module.exports = (webpackConfigEnv) => {
119119
new webpack.DefinePlugin({
120120
"process.env": {
121121
..._.mapValues(config, (value) => JSON.stringify(value)),
122-
APPENV: JSON.stringify(process.env.APPENV),
122+
APPENV: JSON.stringify(process.env.REACT_APP_HOST_ENV),
123+
REACT_APP_HOST_ENV: JSON.stringify(process.env.REACT_APP_HOST_ENV),
123124
APPMODE: JSON.stringify(process.env.APPMODE),
124125
},
125126
}),

0 commit comments

Comments
 (0)