Skip to content

Browser Runtime

Browser examples use core/browser/build.js, a shared esbuild configuration. It bundles an entry module as an ES module, resolves TypeScript files, and supplies shims for Node-oriented modules such as buffer, crypto, worker_threads, path, url, and ws.

The browser build aliases @automerge/automerge to its fullfat_base64 entry point. That package entry embeds Automerge's WASM implementation so a separate .wasm file does not need to be loaded at runtime. Browser applications still use the TypeScript Engine and Chronicle APIs.

npm run watershed:web is the repository's concrete browser example: it builds Watershed's bundle and serves examples/watershed/web with Python's HTTP server on port 8080. Static hosting can serve the generated assets, subject to the application's networking and persistence configuration.