From 1475a49114f41a07795bbe44b449d3f7dc2cb650 Mon Sep 17 00:00:00 2001 From: George Cushen Date: Sat, 6 Mar 2021 21:45:15 +0000 Subject: [PATCH] fix: JS convert ESM back to iife --- wowchemy/layouts/_default/baseof.html | 4 ++-- wowchemy/layouts/partials/site_js.html | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) 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 -}}