From 8bba30b81ab6e70e50dd8b7011b9ed831bd3e59f Mon Sep 17 00:00:00 2001 From: George Cushen Date: Tue, 25 May 2021 19:51:11 +0100 Subject: [PATCH] fix: unminified JavaScript (#2305) Repeat prev commit action on the init script --- wowchemy/layouts/_default/baseof.html | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/wowchemy/layouts/_default/baseof.html b/wowchemy/layouts/_default/baseof.html index 6328e0d0..88b5cd1d 100644 --- a/wowchemy/layouts/_default/baseof.html +++ b/wowchemy/layouts/_default/baseof.html @@ -18,13 +18,13 @@ {{ $js_params := dict "wcDarkLightEnabled" $wcDarkLightEnabled "wcIsSiteThemeDark" $wcIsSiteThemeDark }} {{ $js_bundle := resources.Get "js/wowchemy-init.js" | js.Build (dict "params" $js_params) }} {{- if hugo.IsProduction -}} - {{ $js_bundle = $js_bundle | minify }} - {{- end -}} - {{ $js_bundle := slice $js_bundle_head $js_bundle | resources.Concat "js/wowchemy-init.min.js" }} - {{- if hugo.IsProduction -}} - {{- $js_bundle = $js_bundle | js.Build (dict "format" "iife") | fingerprint "md5" -}} + {{- $js_bundle = $js_bundle | js.Build (dict "format" "iife") | minify -}} {{- else -}} {{- $js_bundle = $js_bundle | js.Build (dict "format" "iife" "sourceMap" "inline") -}} + {{ end }} + {{ $js_bundle := slice $js_bundle_head $js_bundle | resources.Concat "js/wowchemy-init.min.js" }} + {{- if hugo.IsProduction -}} + {{ $js_bundle = $js_bundle | fingerprint "md5" }} {{- end -}}