babel-plugin-template-html-minifier
babel-plugin-template-html-minifier copied to clipboard
When using lit-element or lit-html @event syntax, don't use sortAttributes in htmlMinifier
This is not an issue with your library, but you might want to put it in the hint for htmlMinifier. Using @event-style syntax in elements of your render() templates can cause issues if you use sortAttributes - https://github.com/kangax/html-minifier/issues/1057. Basically the attributes get sorted, but the replacement strings don't.
I would not object to a PR adding a note to the README along with the other notes about lit-html usage in the htmlMinifier section.
CC @LarsDenBakker not sure if this is something open-wc is aware of?
No I never encountered this before
Reading into this more thoroughly, this does seem like a plausible issue.