From 79676c04d47be1310e865b349dcdf5a5b1a73301 Mon Sep 17 00:00:00 2001 From: OJ Kwon <1210596+kwonoj@users.noreply.github.com.> Date: Tue, 6 Feb 2024 16:41:13 -0800 Subject: [PATCH] feat(next-core): expand matching js extensions for the rules --- .../next-swc/crates/next-core/src/next_shared/transforms/mod.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/next-swc/crates/next-core/src/next_shared/transforms/mod.rs b/packages/next-swc/crates/next-core/src/next_shared/transforms/mod.rs index 55074b1705b48..2d0af64ca6d15 100644 --- a/packages/next-swc/crates/next-core/src/next_shared/transforms/mod.rs +++ b/packages/next-swc/crates/next-core/src/next_shared/transforms/mod.rs @@ -70,6 +70,8 @@ fn match_js_extension(enable_mdx_rs: bool) -> Vec { ModuleRuleCondition::ResourcePathEndsWith(".jsx".to_string()), ModuleRuleCondition::ResourcePathEndsWith(".ts".to_string()), ModuleRuleCondition::ResourcePathEndsWith(".tsx".to_string()), + ModuleRuleCondition::ResourcePathEndsWith(".mjs".to_string()), + ModuleRuleCondition::ResourcePathEndsWith(".cjs".to_string()), ]; if enable_mdx_rs {