From ed14d04597fcd0e5028445344f747ff6cb8d4858 Mon Sep 17 00:00:00 2001 From: Edouard Bozon Date: Sun, 2 Feb 2025 23:09:13 +0100 Subject: [PATCH] Include nested files in esm compilation --- scripts/prepare/tsc.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/prepare/tsc.ts b/scripts/prepare/tsc.ts index af6b39e15050..e285df2fdcef 100755 --- a/scripts/prepare/tsc.ts +++ b/scripts/prepare/tsc.ts @@ -59,7 +59,7 @@ const run = async ({ cwd, flags }: { cwd: string; flags: string[] }) => { options: { ...compilerOptions, module: ts.ModuleKind.ES2020, declaration: false }, }).emit(); - const files = globSync(join(process.cwd(), 'dist', '*.js')); + const files = globSync(join(process.cwd(), 'dist', '**/*.js')); await Promise.all(files.map((file) => move(file, file.replace('.js', '.mjs'), {}))); ts.createProgram({