shithub: hugo

Download patch

ref: e81aef0a954623e4a19062d1534bd8c2af97102a
parent: 673e622fa9000c535397fba2b210273cc7d60705
author: Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
date: Mon Jul 20 18:26:38 EDT 2020

resources/js: Add es5 build target

--- a/docs/content/en/hugo-pipes/js.md
+++ b/docs/content/en/hugo-pipes/js.md
@@ -28,7 +28,7 @@
 
 target [string]
 : The language target.
-  One of: `es2015`, `es2016`, `es2017`, `es2018`, `es2019`, `es2020` or `esnext`.
+  One of: `es5`, `es2015`, `es2016`, `es2017`, `es2018`, `es2019`, `es2020` or `esnext`.
   Default is `esnext`.
 
 externals [slice]
--- a/resources/resource_transformers/js/build.go
+++ b/resources/resource_transformers/js/build.go
@@ -127,6 +127,8 @@
 	switch t.options.Target {
 	case defaultTarget:
 		target = api.ESNext
+	case "es5":
+		target = api.ES5
 	case "es6", "es2015":
 		target = api.ES2015
 	case "es2016":