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.
Inlining WASM increases the bundle size.
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.