Minified JS broken with private class identifiers
Closed this issue · 4 comments
PLUS-RobertEhrenleitner commented
When a class contains private attributes or methods, the necessary line break or semicolon is not inserted.
As a minimum non-working example, the following class in valid JavaScript syntax does not work:
class TestClass {
#a = 3
#b = 5
#fnc1() {
do_something()
}
#fnc(2) {
do_anything()
}
}
It is minified to:
class TestClass{#a=3#b=5#fnc1(){do_something()}#fnc(2){do_anything()}}
which contains several syntax errors: There should be line breaks or semicolons between all the attributes and methods.
futtta commented
Autoptimize uses Mr Clay's JS minify for the minification @PLUS-RobertEhrenleitner, it might make more sense to report it there. When solved there I can make sure the upstream update is "inherited" by AO as well.
PLUS-RobertEhrenleitner commented
Thank you for this fast response, I reissued it there.
PLUS-RobertEhrenleitner commented
This issue is fixed by the commit which updates JSMin including my fix.
futtta commented
Thanks for the fixes Robert!
…On Wed, Dec 14, 2022 at 1:48 PM Robert Ehrenleitner @ PLUS < ***@***.***> wrote:
Closed #393 <#393> as
completed.
—
Reply to this email directly, view it on GitHub
<#393 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABMIMNEXYBE7RM4VEET3Y3WNG63HANCNFSM6AAAAAASKAO3JE>
.
You are receiving this because you commented.Message ID:
***@***.***>