resources/js: Add es5 build target

This commit is contained in:
Bjørn Erik Pedersen 2020-07-20 22:26:38 +02:00
parent 673e622fa9
commit e81aef0a95
No known key found for this signature in database
GPG key ID: 330E6E2BD4859D8F
2 changed files with 3 additions and 1 deletions

View file

@ -28,7 +28,7 @@ minify [bool]
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]

View file

@ -127,6 +127,8 @@ func (t *buildTransformation) Transform(ctx *resources.ResourceTransformationCtx
switch t.options.Target {
case defaultTarget:
target = api.ESNext
case "es5":
target = api.ES5
case "es6", "es2015":
target = api.ES2015
case "es2016":