mirror of
https://github.com/gohugoio/hugoDocs.git
synced 2025-09-14 16:54:50 -04:00
parent
08c9ed09a9
commit
3e3458f09d
@ -41,7 +41,7 @@ minify [bool]
|
|||||||
inject [slice]
|
inject [slice]
|
||||||
: This option allows you to automatically replace a global variable with an import from another file. The path names must be relative to `assets`. See https://esbuild.github.io/api/#inject
|
: This option allows you to automatically replace a global variable with an import from another file. The path names must be relative to `assets`. See https://esbuild.github.io/api/#inject
|
||||||
|
|
||||||
shims
|
shims [map]
|
||||||
: This option allows swapping out a component with another. A common use case is to load dependencies like React from a CDN (with _shims_) when in production, but running with the full bundled `node_modules` dependency during development:
|
: This option allows swapping out a component with another. A common use case is to load dependencies like React from a CDN (with _shims_) when in production, but running with the full bundled `node_modules` dependency during development:
|
||||||
|
|
||||||
```go-html-template
|
```go-html-template
|
||||||
@ -84,13 +84,13 @@ defines [map]
|
|||||||
{{ $defines := dict "process.env.NODE_ENV" `"development"` }}
|
{{ $defines := dict "process.env.NODE_ENV" `"development"` }}
|
||||||
```
|
```
|
||||||
|
|
||||||
format [string]
|
format [string]
|
||||||
: The output format.
|
: The output format.
|
||||||
One of: `iife`, `cjs`, `esm`.
|
One of: `iife`, `cjs`, `esm`.
|
||||||
Default is `iife`, a self-executing function, suitable for inclusion as a <script> tag.
|
Default is `iife`, a self-executing function, suitable for inclusion as a <script> tag.
|
||||||
|
|
||||||
sourceMap
|
sourceMap [string]
|
||||||
: Whether to generate `inline` or `external` sourcemap from esbuild. External sourcemaps will be written to the target with the output filename + ".map". Input sourcemaps can be read from js.Build and node modules and combined into the output sourcemaps.
|
: Whether to generate `inline` or `external` source maps from esbuild. External source maps will be written to the target with the output filename + ".map". Input source maps can be read from js.Build and node modules and combined into the output source maps. By default, source maps are not created.
|
||||||
|
|
||||||
### Import JS code from /assets
|
### Import JS code from /assets
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user