writeBundle

Writes a bundle to a file asynchronously.

Writes a bundle to a file asynchronously.

View source ↗

function writeBundle(bundle: Bundle, filepath: string): Promise<bigint>;

Parameters

Prop

Type

Returns

Promise<bigint> — Number of bytes written

Examples

const builder = new BundleBuilder();
builder.insertEntry('/index.html', Buffer.from('<html></html>'));
const bundle = builder.build();
await writeBundle(bundle, 'output.wvb');

On this page