From dc7a9ae127717cde17840496cb0287f481c5f0ee Mon Sep 17 00:00:00 2001 From: Adiel Cristo Date: Tue, 8 Apr 2025 14:00:26 -0300 Subject: [PATCH] content: Update JS options --- content/en/_common/functions/js/options.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/content/en/_common/functions/js/options.md b/content/en/_common/functions/js/options.md index 9dabb9426..475429d05 100644 --- a/content/en/_common/functions/js/options.md +++ b/content/en/_common/functions/js/options.md @@ -14,14 +14,14 @@ params import * as params from '@params'; ``` - Note that this is meant for small data sets, e.g. configuration settings. For larger data, please put/mount the files into `assets` and import them directly. + Note that this is meant for small data sets, e.g., configuration settings. For larger data sets, please put/mount the files into `assets` and import them directly. minify : (`bool`) Whether to let `js.Build` handle the minification. loaders : {{< new-in 0.140.0 />}} -: (`map`) Configuring a loader for a given file type lets you load that file type with an import statement or a require call. For example configuring the .png file extension to use the data URL loader means importing a .png file gives you a data URLcontaining the contents of that image. Loaders available are `none`, `base64`, `binary`, `copy`, `css`, `dataurl`, `default`, `empty`, `file`, `global-css`, `js`, `json`, `jsx`, `local-css`, `text`, `ts`, `tsx`. See https://esbuild.github.io/api/#loader. +: (`map`) Configuring a loader for a given file type lets you load that file type with an `import` statement or a `require` call. For example, configuring the `.png` file extension to use the data URL loader means importing a `.png` file gives you a data URL containing the contents of that image. Loaders available are `none`, `base64`, `binary`, `copy`, `css`, `dataurl`, `default`, `empty`, `file`, `global-css`, `js`, `json`, `jsx`, `local-css`, `text`, `ts`, `tsx`. See https://esbuild.github.io/api/#loader. 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. @@ -64,7 +64,7 @@ externals : (`slice`) External dependencies. Use this to trim dependencies you know will never be executed. See https://esbuild.github.io/api/#external. defines -: (`map`) Allow to define a set of string replacement to be performed when building. Should be a map where each key is to be replaced by its value. +: (`map`) This option allows you to define a set of string replacements to be performed when building. It must be a map where each key will be replaced by its value. ```go-html-template {{ $defines := dict "process.env.NODE_ENV" `"development"` }} @@ -76,7 +76,7 @@ drop : See https://esbuild.github.io/api/#drop sourceMap -: (`string`) Whether to generate `inline`, `linked` or `external` source maps from esbuild. Linked and external source maps will be written to the target with the output file name + ".map". When `linked` a `sourceMappingURL` will also be written to the output file. By default, source maps are not created. Note that the `linked` option was added in Hugo 0.140.0. +: (`string`) Whether to generate `inline`, `linked`, or `external` source maps from esbuild. Linked and external source maps will be written to the target with the output file name + ".map". When `linked` a `sourceMappingURL` will also be written to the output file. By default, source maps are not created. Note that the `linked` option was added in Hugo 0.140.0. sourcesContent : {{< new-in 0.140.0 />}}