hugo-toha/layouts/partials/helpers/script-bundle.html

5 lines
347 B
HTML

{{- $options := partial "helpers/get-esbuild-options.html" -}}
{{- $options = $options | merge (dict "targetPath" "application.js") -}}
{{- $app := resources.Get "scripts/application.js" -}}
{{- $bundle := $app | js.Build $options | fingerprint -}}
<script src="{{ $bundle.RelPermalink }}" integrity="{{ $bundle.Data.Integrity }}" defer></script>