Skip to content

Bundling

buildForBrowser() uses esbuild with platform: "browser", ESM output, and an ES2020 target. It resolves .ts, .js, and .mjs imports, including the repository convention of .js specifiers for TypeScript sources.

The shared configuration aliases Automerge to fullfat_base64.js. That entry embeds the Automerge WASM binary as base64, so the resulting application does not fetch a separate .wasm file at runtime. This increases bundle size; Watershed's deployment notes report a bundle of roughly 3.8 MB, including the inlined WASM.

The builder writes the requested output and, by default, a sourcemap. It does not copy HTML/CSS, configure a web server, or split application code into chunks.