ESbuild
Bundle JavaScript, TypeScript and JSX files using esbuild library.
Installation
Import this plugin in your _config.ts
file to use it:
import lume from "lume/mod.ts";
import esbuild from "lume/plugins/esbuild.ts";
const site = lume();
site.use(esbuild());
export default site;
See all available options in Deno Doc.
Description
The plugin esbuild
processes your JavaScript and TypeScript files using esbuild bundler.
The available options are:
- extensions: Array with the extensions of the files that this plugin will handle. By default it is
[".js", ".ts"]
. - options: The options to pass to esbuild library. See the esbuild documentation.
Example with the default options:
site.use(esbuild({
extensions: [".ts", ".js"],
options: {
bundle: true,
format: "esm",
minify: true,
keepNames: true,
platform: "browser",
target: "esnext",
incremental: true,
treeShaking: true,
},
}));