-
-
Notifications
You must be signed in to change notification settings - Fork 567
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
perf(rspack_core): replace HASH_PLACEHOLDER_REGEX
with simple string parsing
#7907
perf(rspack_core): replace HASH_PLACEHOLDER_REGEX
with simple string parsing
#7907
Conversation
✅ Deploy Preview for rspack canceled.Built without sensitive environment variables
|
@shulaoda can you resolve the conflicts? ❤️ |
f5a5e21
to
a429391
Compare
5bd31c7
to
a06f078
Compare
Wasn't the issue in the description had been resolved? I think this is necessary.
let result = replace_all_hash_pattern("hello-[hash]-[hash:5].js", "[hash]", |n| {
&"abcdefgh"[..n.unwrap_or(8)]
});
assert_eq!(result, Some("hello-abcdefgh-abcde.js".to_string())); |
Sorry. This is a PR from a long time ago, and I fixed the issues in the description later. I have revised the description. |
Summary
Related to rolldown/rolldown#1496
I plan to convert all the regular expressions into string lookup, because these regular expressions are very simple and do not require regex.
rspack/crates/rspack_core/src/options/filename.rs
Lines 19 to 38 in a06f078
Checklist