mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-07 20:30:36 -05:00
resources/js: Add es5 build target
This commit is contained in:
parent
673e622fa9
commit
e81aef0a95
2 changed files with 3 additions and 1 deletions
|
@ -28,7 +28,7 @@ minify [bool]
|
||||||
|
|
||||||
target [string]
|
target [string]
|
||||||
: The language target.
|
: 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`.
|
Default is `esnext`.
|
||||||
|
|
||||||
externals [slice]
|
externals [slice]
|
||||||
|
|
|
@ -127,6 +127,8 @@ func (t *buildTransformation) Transform(ctx *resources.ResourceTransformationCtx
|
||||||
switch t.options.Target {
|
switch t.options.Target {
|
||||||
case defaultTarget:
|
case defaultTarget:
|
||||||
target = api.ESNext
|
target = api.ESNext
|
||||||
|
case "es5":
|
||||||
|
target = api.ES5
|
||||||
case "es6", "es2015":
|
case "es6", "es2015":
|
||||||
target = api.ES2015
|
target = api.ES2015
|
||||||
case "es2016":
|
case "es2016":
|
||||||
|
|
Loading…
Reference in a new issue