@@ -137,13 +137,14 @@ program
137137 > ( )
138138
139139 const startDevServer = async ( ) => {
140- const { config, filepath } = await loadConfig ( root , globalOptions )
140+ const { config, configFilePath } = await loadConfig ( root , globalOptions )
141141
142142 const docDirectory = config . root !
143143
144144 try {
145145 devServer = await dev ( {
146146 config,
147+ configFilePath,
147148 appDirectory : CWD ,
148149 docDirectory,
149150 extraBuilderConfig : {
@@ -156,8 +157,8 @@ program
156157 }
157158
158159 cliWatcher = watch (
159- filepath
160- ? [ filepath , config . i18nSourcePath ! , docDirectory , SITES_FILE ]
160+ configFilePath
161+ ? [ configFilePath , config . i18nSourcePath ! , docDirectory , SITES_FILE ]
161162 : [ ...CONFIG_FILES , docDirectory ] ,
162163 {
163164 ignoreInitial : true ,
@@ -217,7 +218,7 @@ program
217218 . action ( async function ( root ?: string ) {
218219 setNodeEnv ( 'production' )
219220
220- const { config } = await loadConfig (
221+ const { config , configFilePath } = await loadConfig (
221222 root ,
222223 this . optsWithGlobals < GlobalCliOptions > ( ) ,
223224 )
@@ -227,6 +228,7 @@ program
227228 const runBuild = ( ) =>
228229 build ( {
229230 config,
231+ configFilePath,
230232 docDirectory,
231233 } )
232234
@@ -252,9 +254,9 @@ program
252254 ServeOptions & GlobalCliOptions
253255 > ( )
254256
255- const { config } = await loadConfig ( root , globalOptions )
257+ const { config, configFilePath } = await loadConfig ( root , globalOptions )
256258
257- await serve ( { config, host, port } )
259+ await serve ( { config, configFilePath , host, port } )
258260 } )
259261
260262program . addCommand ( newCommand )
0 commit comments