diff --git a/wowchemy/layouts/_default/baseof.html b/wowchemy/layouts/_default/baseof.html index 5e0225e6..6328e0d0 100644 --- a/wowchemy/layouts/_default/baseof.html +++ b/wowchemy/layouts/_default/baseof.html @@ -22,9 +22,9 @@ {{- 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" "esm") | fingerprint "md5" -}} + {{- $js_bundle = $js_bundle | js.Build (dict "format" "iife") | fingerprint "md5" -}} {{- else -}} - {{- $js_bundle = $js_bundle | js.Build (dict "format" "esm" "sourceMap" "inline") -}} + {{- $js_bundle = $js_bundle | js.Build (dict "format" "iife" "sourceMap" "inline") -}} {{- end -}} diff --git a/wowchemy/layouts/partials/site_js.html b/wowchemy/layouts/partials/site_js.html index 14eead97..98982941 100644 --- a/wowchemy/layouts/partials/site_js.html +++ b/wowchemy/layouts/partials/site_js.html @@ -142,9 +142,9 @@ {{- end -}} {{ $js_bundle := slice $js_bundle_head $js_bundle | resources.Concat (printf "%s/js/wowchemy.min.js" .Lang) }} {{- if hugo.IsProduction -}} - {{- $js_bundle = $js_bundle | js.Build (dict "format" "esm") | fingerprint "md5" -}} + {{- $js_bundle = $js_bundle | js.Build (dict "format" "iife") | fingerprint "md5" -}} {{- else -}} - {{- $js_bundle = $js_bundle | js.Build (dict "format" "esm" "sourceMap" "inline") -}} + {{- $js_bundle = $js_bundle | js.Build (dict "format" "iife" "sourceMap" "inline") -}} {{- end -}}