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 ¶
func Run(opts Options) (computev1alpha1.BundleManifest, error)
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.
Click to show internal directories.
Click to hide internal directories.