From e685b2d33ea82323b23810eb91143c69fedba2bc Mon Sep 17 00:00:00 2001 From: Cell <1024@lruihao.cn> Date: Mon, 27 Feb 2023 10:51:50 +0800 Subject: [PATCH] :bug: Fix: js.build is executed after fingerprint, resulting in the destruction of js integrity --- layouts/partials/plugin/script.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/layouts/partials/plugin/script.html b/layouts/partials/plugin/script.html index 8a1e5afe..b10ca0bc 100644 --- a/layouts/partials/plugin/script.html +++ b/layouts/partials/plugin/script.html @@ -14,13 +14,13 @@ {{- if .Minify -}} {{- $resource = $resource | minify -}} {{- end -}} + {{- with .Build -}} + {{- $resource = $resource | js.Build . -}} + {{- end -}} {{- with .Fingerprint -}} {{- $resource = $resource | fingerprint . -}} {{- $integrity = $resource.Data.Integrity -}} {{- end -}} - {{- with .Build -}} - {{- $resource = $resource | js.Build . -}} - {{- end -}} {{- $src = $resource.RelPermalink -}} {{- end -}} {{- $attrs := printf `src="%v"` $src -}}