It seems to me that when I try to minify a javascript file that contains comments, it does not work. It is at least not converted to a single line.
This is the code I am using (borrowed from this forum):
{{ $jquery := resources.Get "jquery/dist/jquery.js" }}
{{ $main := slice $jquery | resources.Concat "main.js" }}
{{ if not .Site.IsServer }}
{{ $main = $main | minify| fingerprint }}
{{ end }}
<script src="{{ $main.Permalink }}" {{ with $main.Data.Integrity }} integrity="{{ . }}"{{ end }}></script>
Is this expected behavior? If so, is there a way to strip out comments from a javascript file in Go?
For clarification, I am looking at the js script after building the site with hugo, and not in server mode. The file is called: public/main.min.113c5b7b912cd8902a5e634df103f165efee5d57a74b96687985264289fd7752.js