import path from 'path' ; import fs from 'fs-extra' ; const CONFIG_DIR = '.config' ; export const getUserConfig = async ( name ) => { const filename = path . resolve ( process . cwd ( ) , CONFIG_DIR , name ) ; try { await fs . access ( filename ) ; return require ( filename ) ; } catch { return undefined ; } } ;