import { pathExistsSync } from "fs-extra" ; import log from "./log" ; export default function readStaticdeployConfig ( configPath ) { if ( ! pathExistsSync ( configPath ) ) { return { } ; } try { return require ( configPath ) ; } catch ( err ) { log . error ( `failed reading config file ${ configPath }` ) ; log . error ( err . message ) ; log . error ( err . stack ) ; process . exit ( 1 ) ; } }