From bf859ebed98eda388ab3a962467e968518c1eb53 Mon Sep 17 00:00:00 2001 From: Sped0n Date: Tue, 31 Oct 2023 00:07:27 +0800 Subject: [PATCH] feat(plugin/script.html): add support for ESBuild to optimize JavaScript resources --- layouts/partials/plugin/script.html | 3 +++ 1 file changed, 3 insertions(+) diff --git a/layouts/partials/plugin/script.html b/layouts/partials/plugin/script.html index cae21ac..b5eb390 100644 --- a/layouts/partials/plugin/script.html +++ b/layouts/partials/plugin/script.html @@ -13,6 +13,9 @@ {{- with .Template -}} {{- $resource = $resource | resources.ExecuteAsTemplate . $.Context -}} {{- end -}} + {{- with .ToESBuild -}} + {{- $resource = $resource | js.Build . -}} + {{- end -}} {{- if .Minify -}} {{- $resource = $resource | minify -}} {{- end -}}