Skip to content
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

fix: update regex chunk filter logic to allow empty chunk names #8550

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion crates/rspack_plugin_split_chunks/src/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ pub fn create_chunk_filter_from_str(chunks: &str) -> ChunkFilter {
}

pub fn create_regex_chunk_filter_from_str(re: RspackRegex) -> ChunkFilter {
Arc::new(move |chunk, _| Ok(chunk.name().map_or(false, |name| re.test(name))))
Arc::new(move |chunk, _| Ok(chunk.name().map_or(true, |name| re.test(name))))
}

#[derive(Debug, Default, Clone)]
Expand Down