Skip to content

Commit

Permalink
scripts.html: fingerprint should be the last thing to do
Browse files Browse the repository at this point in the history
Missed this in ccef9ad
  • Loading branch information
XhmikosR committed Mar 20, 2024
1 parent fa0d873 commit b2a9ef7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/layouts/partials/scripts.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@

{{- $scripts := slice "js/application.js" "js/lazyload.js" -}}
{{- range $scriptFile := $scripts -}}
{{- $script := resources.Get $scriptFile | js.Build $esbuildOptions | fingerprint -}}
{{- $script := resources.Get $scriptFile | js.Build $esbuildOptions -}}

{{- if hugo.IsProduction -}}
{{- $script = $script | resources.Minify -}}
{{- end -}}

{{- $script = $script | resources.Copy (path.Join "/assets" $scriptFile) -}}
{{- $script = $script | fingerprint | resources.Copy (path.Join "/assets" $scriptFile) -}}

<script defer src="{{ $script.RelPermalink }}"></script>
{{- end -}}
Expand Down

0 comments on commit b2a9ef7

Please sign in to comment.