An out-of-the-box config loader with TypeScript support.
npm i load-config-ts -S
import { loadConfig } from 'load-config-ts';
// This load try to load at process.cwd():
// - ulivz.config.js
// - ulivz.config.ts
// - ulivzrc.js
// - ulivzrc.ts
const config = loadConfig({
configKey: 'ulivz',
});
Custom config path:
// This will load `ulivz.config.test.js` directly:
const config = loadConfig({
cwd: useScene('config-suffix'),
configKey: 'ulivz',
configFile: 'ulivz.config.test.js',
});
load-config-ts
wouldn't exist without the inspirations from following projects:
MIT © ULIVZ