-
-
Notifications
You must be signed in to change notification settings - Fork 225
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
minify-dead-code-elimination cause regexp match infinite loop. #981
Comments
Yes,It breaks while compile querystringify |
@kingback In our situation, we pass the compile, but make chrome 100% CPU usage and block debugging :( |
As a workaround, you may replace regexp literal by constructor calls: --- const reg = /(\w+)\(([^)]*)\)/g;
+++ const reg = new RegExp("(\w+)\(([^)]*)\)", "g"); |
Should the plugin provide an option called like 'keepVariable' that doesn't eliminate variables that can be eliminated after evaluating expressions ? We have met the situation that the variables can't be replaced by its value. @JLHwung |
It seems strange to me that babel-plugin-minify-dead-code-elimination is even doing anything here - after all, the code isn't dead. Replacing named constants that are only used in one place seems like a reasonable thing to do in general, but I would expect a different plugin to be responsible for it. |
I just ran into this with jQuery. It causes an infinite loop which makes the entire page unresponsive. |
Same here! |
Describe the bug
To Reproduce
Minimal code to reproduce the bug
Actual Output
If there is no Error thrown,
Expected Output
Configuration
Can be reproduce Using Babel's Online Try Out
babel-minify CLI
babel-plugin-minify-dead-code-elimination:
0.5.1
babel version :
7.9.0
babel-minify-config: default without config
The text was updated successfully, but these errors were encountered: