Closed minht11 closed 3 years ago
Minifier fails to parse if comment is found next to expression inside template literal: Parse Error: <div .icon=@TEMPLATE_EXPRESSION();* Some comment */}></div>
Parse Error: <div .icon=@TEMPLATE_EXPRESSION();* Some comment */}></div>
Code example that causes the problem:
html`<div .icon=${0/* Some comment */}></div>
Reproduction https://repl.it/repls/ImmaterialPointedInternet
This makes using Typescript const enums and minification impossible.
Thanks for the bug! Looks like this is an underlying issue with parse-literals, so I'm going to move this issue to that repo
Fixed on main branch
Minifier fails to parse if comment is found next to expression inside template literal:
Parse Error: <div .icon=@TEMPLATE_EXPRESSION();* Some comment */}></div>
Code example that causes the problem:
Reproduction https://repl.it/repls/ImmaterialPointedInternet
This makes using Typescript const enums and minification impossible.