A TypeScript loader for Cosmiconfig
This package is no longer maintained: Please use this fork from @Codex- instead.
yarn add @endemolshinegroup/cosmiconfig-typescript-loader
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,
},
});