This commit is contained in:
Colin McDonnell
2023-04-25 19:36:58 -07:00
parent 55dbe2a79a
commit 2fbe8ba36d
2 changed files with 6 additions and 7 deletions

View File

@@ -10,7 +10,7 @@ type BunPlugin = Parameters<(typeof Bun)["plugin"]>[0];
export type JavaScriptLoader = "jsx" | "js" | "ts" | "tsx";
export type MacroMap = Record<string, Record<string, string>>;
export type Target = "bun" | "browser" | "node" | "neutral";
export type Format = "iife" | "cjs" | "esm";
export type ModuleFormat = "iife" | "cjs" | "esm";
export type JsxTransform = "transform" | "preserve" | "automatic";
export type Loader =
| "base64"
@@ -44,8 +44,8 @@ type BundlerError = {
};
export interface BuildConfig extends BundlerConfig {
outdir?: string;
entrypoints?: string[];
entrypoints: string[];
outdir: string;
root?: string; // equiv. outbase
watch?: boolean;
}
@@ -93,7 +93,6 @@ export interface BundlerConfig {
conditions?: string[];
origin?: string; // e.g. http://mydomain.com
assetOrigin?: string; // e.g. http://assets.mydomain.com
// in Bun.Transpiler this only accepts a Loader string
// change: set an ext->loader map
@@ -123,7 +122,7 @@ export interface BundlerConfig {
content?: boolean;
};
format?: Format;
module?: ModuleFormat;
// removed: logging, mangleProps, reserveProps, mangleQuoted, mangleCache
@@ -136,7 +135,7 @@ export interface BundlerConfig {
syntax?: boolean;
};
treeShaking?: boolean;
treeshaking?: boolean;
jsx?:
| JsxTransform

View File

@@ -9,7 +9,7 @@ namespace Bun {
export type BuildResult<T> = {
// T will usually be a FileBlob
// or a Blob (for in-memory builds)
outputs: { path: string; result: T }[];
outputs: Map<string, FileBlob | Blob>;
// only exists if `manifest` is true
manifest?: BuildManifest;
log: Log;