Skip to content

fix(worker): match worker import meta more quickly #336

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

Merged
merged 1 commit into from
Jul 22, 2025

Conversation

sapphi-red
Copy link
Member

Description

Changed the regex used for hook filters in workerImportMetaUrlPlugin.

The previous one caused many unnecessary backtracks and caused Maximum call stack size exceeded error when the file is large.

Example on regex101 (before, taking 825steps)
Example on regex101 (after, taking 39steps)

fixes #332

@sapphi-red sapphi-red merged commit 8cab72c into rolldown-vite Jul 22, 2025
39 of 40 checks passed
@sapphi-red sapphi-red deleted the fix/match-worker-import-meta-more-early branch July 22, 2025 12:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[node 23] Maximum call stack size exceeded
1 participant