Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/deno_bundler/plugins/plugin.ts>Plugin

A Bundler with the web in mind.
Latest
class Plugin
import { Plugin } from "https://deno.land/x/deno_bundler@v0.9.1/plugins/plugin.ts";
interface Plugin
import { type Plugin } from "https://deno.land/x/deno_bundler@v0.9.1/plugins/plugin.ts";

Methods

test(item: Item, context: Context): Promise<boolean> | boolean
optional
readSource(input: string, context: Context): Promise<Source> | Source
optional
prepareSource(input: string, context: Context): Promise<Source> | Source
optional
transformSource(
bundleInput: string,
item: Item,
context: Context,
): Promise<Source> | Source
optional
createAsset(item: Item, context: Context): Promise<Asset> | Asset
optional
createChunk(
item: Item,
context: Context,
chunkList: Item[],
): Promise<Chunk> | Chunk
optional
createBundle(chunk: Chunk, context: Context): Promise<Source | void> | Source | void
optional
optimizeBundle(output: string, context: Context): Promise<Source> | Source