Esbuild
module Esbuild| Assembly | Nacara.Plugin.Assets.Esbuild |
| Attributes | [<RequireQualifiedAccess>] |
Resolves what a script imports into one file.
A script the site registers is loaded as a classic script, so an import in one is a syntax error rather than something the browser resolves. Registering multi-file JavaScript therefore needs this plugin, where the same for CSS does not.
Minifying is left to whichever plugin claims .js.
Functions and values
create () : IPlugin
create () : IPluginBundle the site's JavaScript, with the default options.
createWith (configure: EsbuildOptions -> EsbuildOptions) : IPlugin
createWith (configure: EsbuildOptions -> EsbuildOptions) : IPluginBundle the site's JavaScript, configured.
| Parameter | |
|---|---|
configure | Given the defaults, the options to use. Anything it leaves alone keeps its default. |
defaults: EsbuildOptionsregisterWith (configure: EsbuildOptions -> EsbuildOptions) (site: Site) : Site
registerWith (configure: EsbuildOptions -> EsbuildOptions) (site: Site) : SiteAdd JavaScript bundling to a site, configured.
| Parameter | |
|---|---|
configure | Given the defaults, the options to use. Anything it leaves alone keeps its default. |
site | The site being described. |