SL654
January 30, 2023, 10:56pm
1
Maybe this a basic question, but I was wondering why when I run:
netlify build
netlify deploy
The code is not minified, even though in my Hugo netlify.toml file I have:
[build]
publish = "public/"
command = "hugo --debug --minify"
[build.environment]
NODE_ENV = "production"
HUGO_VERSION = "0.105.0"
How can I ensure --minify is executed?
This is the site: https://bullaki.netlify.app/
Thank you
@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.
1 Like
SamO
January 31, 2023, 4:59pm
3
Hi @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
SL654
January 31, 2023, 6:18pm
4
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!