When running the plugin on template literals which don’t have a wrapping <html> tag, the minification does not work unless the tags in question are explicitely allowed through a custom shouldMinify callback.
The sample code to reproduce this (irrelevant stuff removed):
I’m not sure this is intentional or not; to me it feels like a shortcoming, because it does not support the very common use case of custom elements with Shadow DOM.
At least it might make sense to add an option to the plugin that allows to minify the string even if it’s just a fragment rather than a complete document.
When running the plugin on template literals which don’t have a wrapping
<html>
tag, the minification does not work unless the tags in question are explicitely allowed through a customshouldMinify
callback.The sample code to reproduce this (irrelevant stuff removed):
The template literal does not get minified unless I pass an option like:
I’m not sure this is intentional or not; to me it feels like a shortcoming, because it does not support the very common use case of custom elements with Shadow DOM.
At least it might make sense to add an option to the plugin that allows to minify the string even if it’s just a fragment rather than a complete document.