Skip to main content


A compact file format to losslessly serialize an ECMAScript module graph into a single file
Very Popular
Go to Latest
import { load, LoadResponse } from "./loader.ts";import { instantiate, Parser as InternalParser,} from "./eszip_wasm.generated.js";
export type { LoadResponse } from "./loader.ts";
export class Parser extends InternalParser { private constructor() { super(); }
static async createInstance() { // insure instantiate is called await instantiate(); return new Parser(); }}
export async function build( roots: string[], loader: (url: string) => Promise<LoadResponse | undefined> = load,): Promise<Uint8Array> { const { build } = await instantiate(); return build( roots, (specifier: string) => loader(specifier).catch((err) => Promise.reject(String(err))), );}