-
Notifications
You must be signed in to change notification settings - Fork 33
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
[Bug]: Scripts minfiier has cloned variable names that crashes program when mange is activated #173
Comments
it only happends when you have minifyJS: { toplevel: true}, |
teaser would have to have the context of all the scripts at the same time so that even with the top level activated it does not define variables with the same name over and over again |
I think this is a problem in terser, not html-minifier-terser. Please open this issue in the terser project and close this one here. |
No cause teser does what actually have to do that is to mangle variables but he doesn't have the history of previously converted variable names so it mangles it again to the same ones giving the error |
This is not really a bug of html-minifier-terser, since every single It might make more sense to concatenate the scripts before minifying them separately. html-minifier-terser just for minifying the input, but not for keeping track of previous inputs and merging them together as one single script tag. So it's more helpful to ask in the terser repo: https://github.com/terser/terser/issues If there is an update needed for terser in html-minifier-terser, @fabiosantoscode might be the best point of contact. |
So, the problem I have here is that I investigated whether the A workaround here is to wrap your code with |
What happened?
i have two diferent scripts that defines diferent const and two of them defines them witht he same variable name and enter in conflict
Version
latest
What browsers are you seeing the problem on?
Firefox, Chrome, Safari
Link to reproduce
https://genocidioastral.fundacionamigos.repl.co/Pages/doxeo.html
Relevant log output
Willing to submit a PR?
None
The text was updated successfully, but these errors were encountered: