Skip to content

Commit 7c948a3

Browse files
author
Archie Lee
committed
The string should be object instead of string
1 parent 5763d44 commit 7c948a3

File tree

1 file changed

+8
-6
lines changed
  • packages/react-scripts/config

1 file changed

+8
-6
lines changed

packages/react-scripts/config/env.js

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,14 @@ function getClientEnvironment(publicUrl) {
3232
'PUBLIC_URL': publicUrl
3333
});
3434
// Stringify all values so we can feed into Webpack DefinePlugin
35-
var string = Object
36-
.keys(vars)
37-
.reduce((env, key) => {
38-
env[key] = JSON.stringify(vars[key]);
39-
return env;
40-
}, {});
35+
var string = {
36+
'process.env': Object
37+
.keys(vars)
38+
.reduce((env, key) => {
39+
env[key] = JSON.stringify(vars[key]);
40+
return env;
41+
}, {}),
42+
};
4143

4244
return {
4345
vars: vars,

0 commit comments

Comments
 (0)