jsminifier: set JavaScript version

This commit is contained in:
Frédéric Guillot 2024-03-11 17:23:14 -07:00
parent 5bcb37901c
commit d3a85b049b

View file

@ -138,8 +138,10 @@ func GenerateJavascriptBundles() error {
JavascriptBundles = make(map[string][]byte) JavascriptBundles = make(map[string][]byte)
JavascriptBundleChecksums = make(map[string]string) JavascriptBundleChecksums = make(map[string]string)
jsMinifier := js.Minifier{Version: 2017}
minifier := minify.New() minifier := minify.New()
minifier.AddFunc("text/javascript", js.Minify) minifier.AddFunc("text/javascript", jsMinifier.Minify)
for bundle, srcFiles := range bundles { for bundle, srcFiles := range bundles {
var buffer bytes.Buffer var buffer bytes.Buffer