jsminifier: set JavaScript version
This commit is contained in:
parent
5bcb37901c
commit
d3a85b049b
1 changed files with 3 additions and 1 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue