build

package
v0.21.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 30, 2026 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Overview

Package build turns a JS/TS project into a staged compute service bundle: esbuild runs in-process (wrangler-style: ESM output, workerd conditions) with a module-collector plugin that turns wasm/text/data imports into separate bundle modules instead of inlining them.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

Run builds the project and writes the staged bundle (manifest + modules) to opts.OutDir, returning the manifest it wrote.

Types

type Options

type Options struct {
	// Dir is the project root. Defaults to ".".
	Dir string
	// Entry is the entrypoint relative to Dir. Auto-detected from package.json
	// (module, then main) or common locations when empty.
	Entry string
	// OutDir is the staging directory the bundle is written to.
	OutDir string
	// CompatibilityDate for the emitted BundleManifest.
	CompatibilityDate string
	// CompatibilityFlags for the emitted BundleManifest.
	CompatibilityFlags []string
	// Minify the bundled entrypoint.
	Minify bool
}

Options configure one build.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL