Skip to content

Commit

Permalink
feat: add support for .hygen.cjs file lookup
Browse files Browse the repository at this point in the history
This together with jondot#434 should help fix some commonjs problems
  • Loading branch information
wesleycoder authored Dec 3, 2023
1 parent 26f76d8 commit fe3730d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const reversePathsToWalk = ({ folder, path }) => {
}

const configLookup = (file: string, folder: string, path: any = importedPath) =>
uniq(reversePathsToWalk({ folder, path }).map((p) => path.join(p, file)))
uniq(reversePathsToWalk({ folder, path }).map((p) => [path.join(p, file), path.join(p, file).replace(/.js$/, '.cjs')]).flat())

class ConfigResolver {
configFile: string
Expand Down

0 comments on commit fe3730d

Please sign in to comment.