vite-bundle-analyzer
Version:
a modern vite bundle analyzer tool
33 lines (31 loc) • 1.12 kB
TypeScript
declare function encodeSourceMapV3(rawSourceMap: string): Uint8Array;
interface BundleModule {
path: string;
parsedSize: number;
gzipSize: number;
brotliSize: number;
}
declare function init(): void;
interface ScanImportStatmentResult {
static: string[];
dynamic: string[];
}
interface ScanSourceMapImportEntry {
index: number;
source: string;
static: string[];
dynamic: string[];
}
declare function parse(rawSourceMap: string): void;
declare function scanImportStatements(generateCode: string): ScanImportStatmentResult;
declare function scanSourceMapImportsForSourceContent(): ScanSourceMapImportEntry[];
interface PickupMappingsResult {
grouped: Record<string, {
code: string;
}>;
files: string[];
}
declare function pickupMappingsFromCode(generatedCode: string): PickupMappingsResult;
declare function dispose(): void;
export { dispose, encodeSourceMapV3, init, parse, pickupMappingsFromCode, scanImportStatements, scanSourceMapImportsForSourceContent };
export type { BundleModule, PickupMappingsResult, ScanImportStatmentResult, ScanSourceMapImportEntry };