Deno Desktop

Builtin bundles

Ship bundles inside a Deno Desktop app by installing them into the builtin directory the BundleSource reads.

Builtin bundles ship inside the app so the window loads offline on first launch, before any bundle has been downloaded over the air. The BundleSource reads them from its builtinDir; wvb builtin writes the installed set into that directory.

Point the source at a builtin directory

webviewBundle builds its BundleSource from source. Set builtinDir to the directory you install into. It defaults to bundles next to your entry module.

main.ts
import { webviewBundle, bundleProtocol } from '@wvb/deno-desktop';

const wvb = await webviewBundle({
  protocols: [bundleProtocol('app')],
  source: { builtinDir: './bundles' },
});

Install with wvb builtin

Run wvb builtin and point --out at that same directory. It writes a manifest.json plus one <name>/<name>_<version>.wvb file per bundle.

wvb builtin --out ./bundles

Whether bundles come from a remote endpoint or from local workspaces is set by builtin.target in your config, not by a CLI flag. It defaults to a remote target. See wvb builtin for every flag and both target shapes.

On this page