diff --git a/crates/rspack_core/src/dependency/runtime_template.rs b/crates/rspack_core/src/dependency/runtime_template.rs index ac2ee38d5fae..ac72ceff8f01 100644 --- a/crates/rspack_core/src/dependency/runtime_template.rs +++ b/crates/rspack_core/src/dependency/runtime_template.rs @@ -813,6 +813,16 @@ mod test_items_to_regexp { ), "[1234a]".to_string() ); + + assert_eq!( + items_to_regexp( + vec!["foo_js", "_js"] + .into_iter() + .map(String::from) + .collect::>(), + ), + "(|foo)_js".to_string() + ); } #[test]