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 CLIbabel-plugin-minify-dead-code-elimination:
0.5.1babel version :
7.9.0babel-minify-config: default without config
The text was updated successfully, but these errors were encountered: