From c56ac1643990b25f4f2194747fd9996e96651229 Mon Sep 17 00:00:00 2001 From: Lucy Date: Thu, 2 Feb 2023 14:19:22 +0000 Subject: [PATCH] Don't append .js extension to .cjs files --- src/package.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/package.ts b/src/package.ts index 9ce7734d..29e8f127 100644 --- a/src/package.ts +++ b/src/package.ts @@ -985,7 +985,7 @@ class LaunchEntryPointProcessor extends BaseProcessor { } appendJSExt(filePath: string): string { - if (filePath.endsWith('.js')) { + if (filePath.endsWith('.js') || filePath.endsWith('.cjs')) { return filePath; } return filePath + '.js';