Skip to content

Esbuild

module Esbuild
AssemblyNacara.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

Bundle the site's JavaScript, with the default options.

createWith (configure: EsbuildOptions -> EsbuildOptions) : IPlugin

Bundle the site's JavaScript, configured.

Parameter
configureGiven the defaults, the options to use. Anything it leaves alone keeps its default.
defaults: EsbuildOptions
register (site: Site) : Site

Add JavaScript bundling to a site.

registerWith (configure: EsbuildOptions -> EsbuildOptions) (site: Site) : Site

Add JavaScript bundling to a site, configured.

Parameter
configureGiven the defaults, the options to use. Anything it leaves alone keeps its default.
siteThe site being described.