File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change 11const path = require ( 'path' ) ;
2+ const fs = require ( 'fs' ) ;
23const glob = require ( 'glob' ) ;
34const modRewrite = require ( 'connect-modrewrite' ) ;
45const pug = require ( 'pug' ) ;
@@ -461,6 +462,8 @@ const defaultConfig = (paths, config) => ({
461462
462463class Config {
463464 constructor ( ) {
465+ const configPath = path . join ( cwd ( ) , 'light.config.js' ) ;
466+
464467 const defaultPaths = {
465468 app : path . posix . join ( process . cwd ( ) , 'app' ) ,
466469 tmp : path . posix . join ( process . cwd ( ) , '.tmp' ) ,
@@ -480,8 +483,11 @@ class Config {
480483
481484 let config = { } ;
482485 let paths = { } ;
486+ let myConfig = null ;
483487
484- const myConfig = require ( path . posix . join ( process . cwd ( ) , 'light.config.js' ) ) ; // eslint-disable-line
488+ if ( fs . existsSync ( configPath ) ) {
489+ myConfig = require ( configPath ) ; // eslint-disable-line
490+ }
485491
486492 if ( typeof ( myConfig ) === 'function' ) {
487493 ( { config = { } , paths = { } } =
You can’t perform that action at this time.
0 commit comments