Closed web-padawan closed 5 years ago
I have seen this, I'm not sure where this is happening. I'll hopefully have a chance to investigate further but right now the work-around I've found is to use JavaScript unicode encoding. So content: "\u2003";
seems to work correctly.
When you say this does not happen for tagged template literals transpiled to ES5, does that transpile prevent babel-plugin-template-html-minifier
from running?
The code transpiled to ES5 is still minified correctly, and \\2003
remains unchanged.
I suspected it could happen in the terser
but when I disable minifier, it is not broken.
Note: "\u2003"
does not seem to work in the CSS pseudo elements.
@web-padawan Could you test your project using #9? Once you confirm this fixes the issue for you without side effects I'll merge and publish to NPM.
The following input is not processed properly:
The extra slash is removed, which results in "Octal literal in strict mode" parse error. Can be reproduced in web-padawan/polymer3-webpack-starter#18
Note: does not happens when tagged template literals are transpiled to ES5.