Closed chrisspiegl closed 2 years ago
I tried using the clean-css option to import / process remote @import statements ({ inline: ['remote'] }).
clean-css
@import
{ inline: ['remote'] }
This option however only works when the clean-css function is called with a callback.
Example based on "How to process remote @imports correctly:
var source = '@import url(http://example.com/path/to/remote/styles);'; new CleanCSS({ inline: ['remote'] }).minify(source, function (error, output) { // output.styles });
Since the html-minifier-terser currently does not support async minifyCSS this is not working.
html-minifier-terser
minifyCSS
Async minification for JS was implemented based on this Issue: https://github.com/terser/html-minifier-terser/issues/49
Maybe CSS is similar to achieve?
Fixed in v7.0.0-alpha.2
I tried using the
clean-css
option to import / process remote@import
statements ({ inline: ['remote'] }
).This option however only works when the
clean-css
function is called with a callback.Example based on "How to process remote
@import
s correctly:Since the
html-minifier-terser
currently does not support asyncminifyCSS
this is not working.Async minification for JS was implemented based on this Issue: https://github.com/terser/html-minifier-terser/issues/49
Maybe CSS is similar to achieve?