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

Conversation

MindFreeze
Copy link

Summary

fixes #8529 by allowing None chunks to pass the Regex like in JS . This would be a breaking change though.
If this is not ok, than the docs should be updated instead.

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

@CLAassistant
Copy link

CLAassistant commented Nov 27, 2024

CLA assistant check
All committers have signed the CLA.

@github-actions github-actions bot added the release: bug fix release: bug related release(mr only) label Nov 27, 2024
Copy link

netlify bot commented Nov 27, 2024

Deploy Preview for rspack canceled.

Built without sensitive environment variables

Name Link
🔨 Latest commit cb9e082
🔍 Latest deploy log https://app.netlify.com/sites/rspack/deploys/6746c90c97309500083f3778

@inottn
Copy link
Collaborator

inottn commented Nov 27, 2024

The changes in this PR are not entirely correct. In JavaScript, the regex.test method converts the argument to a string, so regex.test(undefined) behaves the same as regex.test('undefined').

@MindFreeze
Copy link
Author

Ah, indeed. Didn't notice because I was using to regex to exclude stuff. It would be better to just mention it in the docs then

@MindFreeze MindFreeze closed this Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release: bug fix release: bug related release(mr only)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: chunks Regex produces different results when used in a function
3 participants