UNPKG

cogs

Version:

The fast file transform pipeline.

14 lines (11 loc) 381 B
import npath from 'path'; import normalizeConfig from '#src/normalize-config.js'; export default async configPath => { try { const path = npath.resolve(configPath); const { default: config } = await import(`${path}?at=${Date.now()}`); return await normalizeConfig(config); } catch (er) { throw new Error(`Unable to load '${configPath}'\n${er.stack}`); } };