File tree Expand file tree Collapse file tree 3 files changed +7
-2
lines changed
packages/react-scripts/scripts Expand file tree Collapse file tree 3 files changed +7
-2
lines changed Original file line number Diff line number Diff line change 1111'use strict' ;
1212
1313// Do this as the first thing so that any code reading it knows the right env.
14+ process . env . BABEL_ENV = 'production' ;
1415process . env . NODE_ENV = 'production' ;
1516
1617// Makes the script crash on unhandled rejections instead of silently
Original file line number Diff line number Diff line change 1010// @remove -on-eject-end
1111'use strict' ;
1212
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+
1317// Makes the script crash on unhandled rejections instead of silently
1418// ignoring them. In the future, promise rejections that are not handled will
1519// terminate the Node.js process with a non-zero exit code.
1620process . on ( 'unhandledRejection' , err => {
1721 throw err ;
1822} ) ;
1923
20- process . env . NODE_ENV = 'development' ;
21-
2224// Ensure environment variables are read.
2325require ( '../config/env' ) ;
2426
Original file line number Diff line number Diff line change 1010// @remove -on-eject-end
1111'use strict' ;
1212
13+ // Do this as the first thing so that any code reading it knows the right env.
14+ process . env . BABEL_ENV = 'test' ;
1315process . env . NODE_ENV = 'test' ;
1416process . env . PUBLIC_URL = '' ;
1517
You can’t perform that action at this time.
0 commit comments