From 47ad18731a3a6218b3c97e3e757e6f8c83694eb2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Donny/=EA=B0=95=EB=8F=99=EC=9C=A4?= Date: Fri, 18 Nov 2022 14:10:27 +0900 Subject: [PATCH] Real fxi --- crates/swc_ecma_transforms_module/src/path.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/crates/swc_ecma_transforms_module/src/path.rs b/crates/swc_ecma_transforms_module/src/path.rs index 1701b37fc8bb..67378f5fe563 100644 --- a/crates/swc_ecma_transforms_module/src/path.rs +++ b/crates/swc_ecma_transforms_module/src/path.rs @@ -127,7 +127,11 @@ where }; if use_orig { - p.set_extension(orig_ext); + if matches!(orig_ext, "js" | "mjs" | "cjs" | "jsx") { + p.set_extension(orig_ext); + } else { + p.set_extension(""); + } } } else { p.set_extension("");