File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -296,14 +296,18 @@ const main = async () => {
296296 const { command, options } = await program . execute ( { args : process . argv } ) ;
297297
298298 let customConfig = null ;
299+ let customConfigPath ;
299300
300301 if ( options . customConfig ) {
301302 try {
302- const customConfigPath = resolve ( process . cwd ( ) , options . customConfig ) ;
303- console . log ( `✨ found custom config at: ${ customConfigPath } ` ) ;
303+ customConfigPath = resolve ( process . cwd ( ) , options . customConfig ) ;
304304 customConfig = await import ( customConfigPath ) ;
305+ customConfig = customConfig . default || customConfig ;
305306 } catch ( e ) {
306- /* empty */
307+ console . error ( 'Error loading custom config' , e ) ;
308+ }
309+ if ( customConfig ) {
310+ console . log ( `✨ found custom config at: ${ customConfigPath } ` ) ;
307311 }
308312 }
309313
You can’t perform that action at this time.
0 commit comments