Hey all,
I use js.Build
to build my JavaScript file like that:
{{ $script := resources.Get .path | js.Build (dict "target" "es2015" "minify" true) | fingerprint }}
<script type="text/javascript" src="{{ $script.RelPermalink }}" defer></script>
I usually use defer
for performance reason, but I now have a script that I’d like to execute immediately. Of course I could just remove the defer
and be done with it. Instead, I’d like to inline the minified JavaScript string created by js.Build
.
Is that possible with Hugo? I somehow assume it’s not but i’d like to be sure.