This repository was archived by the owner on Jan 26, 2019. It is now read-only.
File tree 3 files changed +7
-2
lines changed
packages/react-scripts/scripts
3 files changed +7
-2
lines changed Original file line number Diff line number Diff line change 11
11
'use strict' ;
12
12
13
13
// Do this as the first thing so that any code reading it knows the right env.
14
+ process . env . BABEL_ENV = 'production' ;
14
15
process . env . NODE_ENV = 'production' ;
15
16
16
17
// Makes the script crash on unhandled rejections instead of silently
Original file line number Diff line number Diff line change 10
10
// @remove -on-eject-end
11
11
'use strict' ;
12
12
13
+ // Do this as the first thing so that any code reading it knows the right env.
14
+ process . env . BABEL_ENV = 'development' ;
15
+ process . env . NODE_ENV = 'development' ;
16
+
13
17
// Makes the script crash on unhandled rejections instead of silently
14
18
// ignoring them. In the future, promise rejections that are not handled will
15
19
// terminate the Node.js process with a non-zero exit code.
16
20
process . on ( 'unhandledRejection' , err => {
17
21
throw err ;
18
22
} ) ;
19
23
20
- process . env . NODE_ENV = 'development' ;
21
-
22
24
// Ensure environment variables are read.
23
25
require ( '../config/env' ) ;
24
26
Original file line number Diff line number Diff line change 10
10
// @remove -on-eject-end
11
11
'use strict' ;
12
12
13
+ // Do this as the first thing so that any code reading it knows the right env.
14
+ process . env . BABEL_ENV = 'test' ;
13
15
process . env . NODE_ENV = 'test' ;
14
16
process . env . PUBLIC_URL = '' ;
15
17
You can’t perform that action at this time.
0 commit comments