docs
evals
scenario-1
scenario-10
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
Create a small TypeScript module that triggers production bundling for web assets using the dependency's production build command rather than its dev server or watch mode.
distDir with minified, content-hashed asset filenames. @testsourceMaps: false omits source maps from the emitted assets. @testpublicUrl is provided, emitted HTML and manifest references prefix asset URLs with that base URL. @testcacheDir is provided, the build uses (or creates) that directory for caching instead of the default cache location, and reuses it on subsequent builds. @testexport interface BuildOptions {
entries: string[]; // entry HTML or JS files to bundle for production
distDir: string; // destination directory for compiled assets
publicUrl?: string; // base URL prefix for emitted asset references
cacheDir?: string; // optional cache directory override
sourceMaps?: boolean; // enable or disable source map generation
}
export interface BuildResult {
distDir: string;
bundleCount: number;
}
export function runProductionBuild(options: BuildOptions): Promise<BuildResult>;Provides the production bundling command-line interface used to generate optimized builds.