@endemolshinegroup/cosmiconfig-typescript-loader
v3.0.2
Published
A TypeScript loader for Cosmiconfig
Downloads
3,235,842
Readme
A TypeScript loader for Cosmiconfig
Installation
yarn add @endemolshinegroup/cosmiconfig-typescript-loader
Usage
import cosmiconfig from 'cosmiconfig';
import TypeScriptLoader from '@endemolshinegroup/cosmiconfig-typescript-loader';
const moduleName = 'myModuleName';
const explorer = cosmiconfig(moduleName, {
searchPlaces: [
'package.json',
`.${moduleName}rc`,
`.${moduleName}rc.json`,
`.${moduleName}rc.yaml`,
`.${moduleName}rc.yml`,
`.${moduleName}rc.ts`,
`.${moduleName}rc.js`,
`${moduleName}.config.ts`,
`${moduleName}.config.js`,
],
loaders: {
'.ts': TypeScriptLoader,
},
});