export type ImportKind = 'entry-point' | 'import-statement' | 'require-call' | 'dynamic-import' | 'require-resolve' | 'import-rule' | 'composes-from' | 'url-token'; export interface Metafile { inputs: Record; outputs: Record; imports: { path: string; kind: ImportKind | 'file-loader'; external?: boolean; }[]; exports: string[]; entryPoint?: string; cssBundle?: string; }>; } export interface OutputFile { path: string; text: string; } export interface CompileResult { metafile?: Metafile | undefined; outputFiles: OutputFile[]; } export interface CompileOptions { /** * whether to produce Typescript types or ESM code */ type: 'module' | 'types'; /** * the entry point for the bundle, relative to the inDir. if not provided, the files in the inDir will be processed * as individual unbundled files */ entryPoint?: string | undefined; /** * source code */ inDir: string; /** * build directory */ outDir: string; /** * build file, relative to the outDir */ outFile?: string | undefined; /** * external modules to exclude from the bundle */ external?: string[] | undefined; /** * whether to minify output */ minify?: boolean | undefined; /** * whether to include sourcemap */ sourceMap?: boolean | undefined; /** * working directory */ workingDirectory?: string | undefined; } export default function ({ type, entryPoint, inDir, outDir, outFile, external, minify, sourceMap, workingDirectory, }: CompileOptions): Promise;