January 30, 2023, 10:56pm
Maybe this a basic question, but I was wondering why when I run:
The code is not minified, even though in my Hugo netlify.toml file I have:
publish = "public/"
command = "hugo --debug --minify"
NODE_ENV = "production"
HUGO_VERSION = "0.105.0"
How can I ensure --minify is executed?
This is the site:
@SL654 Your HTML does seem to be minified?
I’ve only had a quick look at the Hugo docs, but as I understand it
--minify only minifies the HTML.
January 31, 2023, 4:59pm
@SL654 welcome back to the forums. Your HTML is minified. Can you clarify what you you are referring to?
Here a repo that you can reference for setting up minify-
GitHub - philhawksworth/netlify-plugin-minify-html
January 31, 2023, 6:18pm
Thanks guys. Yes, HTML is minified, I got fooled by the highlight.js file, which I’ve imported from the CND and it isn’t minified. The rest of *.js seems to be minified through “esbuild”. So I guess, problem solved!