JS minification removes spaces from template literals
-
Hi guys,
In one of my javascript files, I use a template literal like so:
return ‘string text ${expression} string text’
EDIT: I’m unable to include the “backtick” in the above code. The single quote ‘ should be replaced with a backtick, as in https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals
But I’m finding that the JS minification is incorrectly removing the spaces to produce
stringtexthellostringtext
I assume this is a bug? Or is there way to have this minified without stripping of the spaces?
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘JS minification removes spaces from template literals’ is closed to new replies.