@@ -272,16 +272,16 @@ export function sortManifestFunctions(functions: Manifest['functions']) {
272
272
273
273
export function findAndParseConfigFile ( userProvidedConfigFilepath ?: string ) : Partial < PrestaConfig > {
274
274
if ( userProvidedConfigFilepath ) {
275
- return requireFresh ( path . resolve ( userProvidedConfigFilepath ) ) ?. default
275
+ return requireFresh ( path . resolve ( userProvidedConfigFilepath ) )
276
276
} else {
277
277
try {
278
- return requireFresh ( path . resolve ( defaultJSConfigFilepath ) ) ?. default
278
+ return requireFresh ( path . resolve ( defaultJSConfigFilepath ) )
279
279
} catch ( e ) {
280
280
if ( fs . existsSync ( defaultJSConfigFilepath ) ) {
281
281
throw e
282
282
} else {
283
283
try {
284
- return requireFresh ( path . resolve ( defaultTSConfigFilepath ) ) ?. default
284
+ return requireFresh ( path . resolve ( defaultTSConfigFilepath ) )
285
285
} catch ( e ) {
286
286
if ( fs . existsSync ( defaultTSConfigFilepath ) ) {
287
287
throw e
@@ -648,10 +648,14 @@ export class Presta {
648
648
const html = response . body
649
649
const outfile = path . join ( this . staticOutputDir , filename )
650
650
651
- fs . outputFileSync ( outfile , html , 'utf-8' )
652
- builtFiles . push ( outfile )
651
+ if ( ! html ) {
652
+ this . logger . warn ( `Nothing to build for ${ url } , response.body is undefined` )
653
+ } else {
654
+ fs . outputFileSync ( outfile , html , 'utf-8' )
655
+ builtFiles . push ( outfile )
653
656
654
- this . logger . info ( `● ${ url } ` , { duration : time ( ) } )
657
+ this . logger . info ( `● ${ url } ` , { duration : time ( ) } )
658
+ }
655
659
}
656
660
657
661
// diff previous built files with new files and remove stale
0 commit comments