I experienced the same issues as described in #2. It looks like comp returns a Promise and the node process running the onSuccess terminates before the Promise is resolved. As a result only some but not all files are minified.
Proposing a solution here that waits for the Promise to be resolved, i.e. until all files are minified.
NOTE: I verified the behaviour described above by making a local copy of netlify-plugin-minify-html and adding it to netlify.toml.
If I install netlify-plugin-minify-html from the plugin registry, it looks like ~no HTML files are minified at all~ only the 404.html on my site , so this might not fully resolve issue #2.
Hi @philhawksworth,
I experienced the same issues as described in #2. It looks like
comp
returns aPromise
and the node process running theonSuccess
terminates before the Promise is resolved. As a result only some but not all files are minified.Proposing a solution here that waits for the Promise to be resolved, i.e. until all files are minified.
NOTE: I verified the behaviour described above by making a local copy of
netlify-plugin-minify-html
and adding it tonetlify.toml
.If I install
netlify-plugin-minify-html
from the plugin registry, it looks like ~no HTML files are minified at all~ only the404.html
on my site , so this might not fully resolve issue #2.