From fe3730d1a25976c4859f78d0d08642c90a83d860 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?W=C3=A9sley=20Guimar=C3=A3es?= Date: Sun, 3 Dec 2023 01:02:39 -0300 Subject: [PATCH] feat: add support for .hygen.cjs file lookup This together with #434 should help fix some commonjs problems --- src/config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/config.ts b/src/config.ts index 5d5fbc87..bce58fb8 100644 --- a/src/config.ts +++ b/src/config.ts @@ -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