Skip to content

Commit

Permalink
alpinejs: Fix order to get proper production build with fingerprinting
Browse files Browse the repository at this point in the history
  • Loading branch information
bep committed Oct 16, 2020
1 parent 6363317 commit 941a684
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions alpinejs/layouts/partials/jslibs/alpinejs/script-src.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
{{- $js := resources.Get "jslibs/alpinejs/alpine.js" -}}
{{- $js11 := resources.Get "jslibs/alpinejs/alpine-ie11.js" -}}
{{- $jsTurbolinksAdapter := resources.Get "jslibs/alpinejs-turbolinks/alpine-turbolinks-adapter.js" -}}
{{- $js = slice $jsTurbolinksAdapter $js | resources.Concat "jslibs/alpinejs/alpine.js" -}}
{{- $js11 = slice $jsTurbolinksAdapter $js11 | resources.Concat "jslibs/alpinejs/alpine-ie11.js" -}}
{{- if $isProd }}
{{ $js = $js | minify | fingerprint }}
{{ end -}}
{{- if $isProd }}
{{ $js11 = $js11 | minify | fingerprint }}
{{ end -}}
{{- $js = slice $jsTurbolinksAdapter $js | resources.Concat "jslibs/alpinejs/alpine.js" -}}
{{- $js11 = slice $jsTurbolinksAdapter $js11 | resources.Concat "jslibs/alpinejs/alpine-ie11.js" -}}
<script type="module" src="{{ $js.RelPermalink }}" {{ if $isProd }} integrity="{{ $js.Data.Integrity }}" {{ end }}></script>
<script nomodule src="{{ $js11.RelPermalink }}" {{ if $isProd }} integrity="{{ $js11.Data.Integrity }}" {{ end }} defer></script>

0 comments on commit 941a684

Please sign in to comment.