resources/js: Add option for setting bundle format

Fixes #7503
This commit is contained in:
Bjørn Erik Pedersen
2020-07-21 17:59:03 +02:00
parent eded9ac2a0
commit 0256959a35
5 changed files with 129 additions and 42 deletions

View File

@@ -45,6 +45,11 @@ defines [map]
{{ $defines := dict "process.env.NODE_ENV" `"development"` }}
```
format [string] {{< new-in "0.75.0" >}}
: The output format.
One of: `iife`, `cjs`, `esm`.
Default is `iife`, a self-executing function, suitable for inclusion as a <script> tag.
### Examples
```go-html-template