File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -40,13 +40,15 @@ if (isDirectoryEmpty(buildPath)) {
40
40
console . log ( chalk . bold . red ( `ERROR: No build found. Please run ${ formattedBuildCmd } first.` ) ) ;
41
41
} else {
42
42
let configuredPort ;
43
- let envConfig ;
44
43
45
44
try {
46
- envConfig = require ( path . join ( process . cwd ( ) , 'env.config.js' ) ) ;
47
- configuredPort = envConfig ?. PORT || process . env . PORT ;
45
+ configuredPort = require ( path . join ( process . cwd ( ) , 'env.config.js' ) ) ?. PORT ;
48
46
} catch ( error ) {
49
- // pass, consuming applications may not have an `env.config.js` file. This is OK.
47
+ // Pass. Consuming applications may not have an `env.config.js` file. This is OK.
48
+ }
49
+
50
+ if ( ! configuredPort ) {
51
+ configuredPort = process . env . PORT ;
50
52
}
51
53
52
54
// No `PORT` found in `env.config.js` and/or `.env.development|private`, so output a warning.
You can’t perform that action at this time.
0 commit comments