I’m looking for some insight on this as well, in my case I don’t have a problem with spaces being removed (as long as it’s not between words) but for some reason some new lines still get generated. Seems to happen inside a {{ range }}, I tried removing the indentation inside the range but it didn’t work
Author of minify here. In general a lack of newlines does not mean it is minified well! You will actually see that other minifiers would use a space instead of a newline, which results in the same file size. Whitespace (space or newline) is significant between phrasing elements (such as the A tag), so these space must be preserved in the same way we preserve spaces between words.
Other insignificant whitespace is always removed (unless you use display:block on an inline element and then depend on whitespace for element positioning … BAD!).
If you think a space could be removed safely or a whitespace is removed that is unsafe, please report a bug at the minify github!
I don’t use the JS framework, only the CSS integration of Font Awesome 5, which relies on the ::before pseudo element content with an hexadecimal refering to a character in a font file. With the minification the space between the i element and the date disappears.
Yes this is a valid problem that should be fixed in the minifier (though I’d argue this a bad design from the Font Awesome package actually!). See https://github.com/tdewolff/minify/issues/240
Actually Font Awesome is one example, but the pseudo element content CSS property is used in various places, it could be quotes for blockquote element, etc.