Skip to content

Commit

Permalink
fix(conf): support cjs extension for config and process ESM in js fil…
Browse files Browse the repository at this point in the history
…e by Jiti
  • Loading branch information
timofei-iatsenko committed Mar 23, 2023
1 parent bc5f2a4 commit 5e368ec
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/conf/src/getConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ export function getConfig({
const configExplorer = cosmiconfigSync(moduleName, {
searchPlaces: [
`${moduleName}.config.js`,
`${moduleName}.config.cjs`,
`${moduleName}.config.ts`,
`${moduleName}.config.mjs`,
"package.json",
Expand All @@ -45,6 +46,7 @@ export function getConfig({
`.${moduleName}rc.js`,
],
loaders: {
".js": JitiLoader(),
".ts": JitiLoader(),
".mjs": JitiLoader(),
},
Expand Down

0 comments on commit 5e368ec

Please sign in to comment.