@@ -12,16 +12,6 @@ var argv = require("minimist")(process.argv.slice(2));
1212const getFilePathFromUrl = require ( './get-file-path-from-url' ) ;
1313const proxyHandler = require ( "./proxy" ) ;
1414
15- // Pre-process arguments
16- const useHttps = argv . ssl || argv . https ;
17- const basePath = argv . path ? path . resolve ( argv . path ) : process . cwd ( ) ;
18- const baseHref = argv . baseHref ? argv . baseHref : '' ;
19- const rootFile = argv . rootFile ? argv . rootFile : 'index.html' ;
20- const port = getPort ( argv . p ) ;
21-
22- const NO_PATH_FILE_ERROR_MESSAGE =
23- `Error: rootFile ${ rootFile } could not be found in the specified path ` ;
24-
2515// if using config file, load that first
2616if ( argv . config ) {
2717 let configPath ;
@@ -41,6 +31,16 @@ if (argv.config) {
4131 argv = Object . assign ( config , argv ) ;
4232}
4333
34+ // Pre-process arguments
35+ const useHttps = argv . ssl || argv . https ;
36+ const basePath = argv . path ? path . resolve ( argv . path ) : process . cwd ( ) ;
37+ const baseHref = argv . baseHref || '' ;
38+ const rootFile = argv . rootFile || 'index.html' ;
39+ const port = getPort ( argv . p ) ;
40+
41+ const NO_PATH_FILE_ERROR_MESSAGE =
42+ `Error: rootFile ${ rootFile } could not be found in the specified path ` ;
43+
4444// As a part of the startup - check to make sure we can accessrootFile
4545returnDistFile ( true ) ;
4646
0 commit comments