File tree Expand file tree Collapse file tree 5 files changed +35
-0
lines changed Expand file tree Collapse file tree 5 files changed +35
-0
lines changed Original file line number Diff line number Diff line change 1313// Do this as the first thing so that any code reading it knows the right env.
1414process . env . NODE_ENV = 'production' ;
1515
16+ // Makes the script crash on unhandled rejections instead of silently
17+ // ignoring them. In the future, promise rejections that are not handled will
18+ // terminate the Node.js process with a non-zero exit code.
19+ process . on ( 'unhandledRejection' , err => {
20+ throw err ;
21+ } ) ;
22+
1623// Load environment variables from .env file. Suppress warnings using silent
1724// if this file is missing. dotenv will never modify any environment variables
1825// that have already been set.
Original file line number Diff line number Diff line change 99 */
1010'use strict' ;
1111
12+ // Makes the script crash on unhandled rejections instead of silently
13+ // ignoring them. In the future, promise rejections that are not handled will
14+ // terminate the Node.js process with a non-zero exit code.
15+ process . on ( 'unhandledRejection' , err => {
16+ throw err ;
17+ } ) ;
18+
1219const fs = require ( 'fs-extra' ) ;
1320const path = require ( 'path' ) ;
1421const spawnSync = require ( 'cross-spawn' ) . sync ;
Original file line number Diff line number Diff line change 99 */
1010'use strict' ;
1111
12+ // Makes the script crash on unhandled rejections instead of silently
13+ // ignoring them. In the future, promise rejections that are not handled will
14+ // terminate the Node.js process with a non-zero exit code.
15+ process . on ( 'unhandledRejection' , err => {
16+ throw err ;
17+ } ) ;
18+
1219const fs = require ( 'fs-extra' ) ;
1320const path = require ( 'path' ) ;
1421const spawn = require ( 'cross-spawn' ) ;
Original file line number Diff line number Diff line change 1010// @remove -on-eject-end
1111'use strict' ;
1212
13+ // Makes the script crash on unhandled rejections instead of silently
14+ // ignoring them. In the future, promise rejections that are not handled will
15+ // terminate the Node.js process with a non-zero exit code.
16+ process . on ( 'unhandledRejection' , err => {
17+ throw err ;
18+ } ) ;
19+
1320process . env . NODE_ENV = 'development' ;
1421
1522// Load environment variables from .env file. Suppress warnings using silent
Original file line number Diff line number Diff line change 1313process . env . NODE_ENV = 'test' ;
1414process . env . PUBLIC_URL = '' ;
1515
16+ // Makes the script crash on unhandled rejections instead of silently
17+ // ignoring them. In the future, promise rejections that are not handled will
18+ // terminate the Node.js process with a non-zero exit code.
19+ process . on ( 'unhandledRejection' , err => {
20+ throw err ;
21+ } ) ;
22+
1623// Load environment variables from .env file. Suppress warnings using silent
1724// if this file is missing. dotenv will never modify any environment variables
1825// that have already been set.
You can’t perform that action at this time.
0 commit comments