{{ $lazysizes := resources.Get "js/vendor/lazysizes/lazysizes.min.js" -}}
{{ if eq (hugo.Environment) "development" -}}
{{ $alpinejs := resources.Get "js/vendor/alpinejs/alpine.js" -}}
{{ $app := resources.Get "js/app.js" -}}
{{ $js := slice $alpinejs $lazysizes $app | resources.Concat "main.js" -}}
{{ else -}}
{{ $alpinejs := resources.Get "js/vendor/alpinejs/alpine.js" | minify -}}
{{ $app := resources.Get "js/app.js" | minify -}}
{{ $js := slice $alpinejs $lazysizes $app | resources.Concat "main.js" -}}
{{ $secureJS := $js | resources.Fingerprint "sha512" -}}
{{ end -}}