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 1
1
const path = require ( 'path' ) ;
2
+ const fs = require ( 'fs' ) ;
2
3
const glob = require ( 'glob' ) ;
3
4
const modRewrite = require ( 'connect-modrewrite' ) ;
4
5
const pug = require ( 'pug' ) ;
@@ -461,6 +462,8 @@ const defaultConfig = (paths, config) => ({
461
462
462
463
class Config {
463
464
constructor ( ) {
465
+ const configPath = path . join ( cwd ( ) , 'light.config.js' ) ;
466
+
464
467
const defaultPaths = {
465
468
app : path . posix . join ( process . cwd ( ) , 'app' ) ,
466
469
tmp : path . posix . join ( process . cwd ( ) , '.tmp' ) ,
@@ -480,8 +483,11 @@ class Config {
480
483
481
484
let config = { } ;
482
485
let paths = { } ;
486
+ let myConfig = null ;
483
487
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
+ }
485
491
486
492
if ( typeof ( myConfig ) === 'function' ) {
487
493
( { config = { } , paths = { } } =
You can’t perform that action at this time.
0 commit comments