import { SiteConfig } from './interface' ; export const getSiteConfig = ( currentPath ) => { let siteConfig ; try { siteConfig = require ( currentPath ) ; } catch ( e ) { console . error ( `Failed to read the site config file. Please check ${ currentPath }.` ) ; throw e ; } return siteConfig ; } ;