#525·automerge

Bundling with Parcel

Author: cgauldCreated Feb 9, 2023Updated Aug 21, 2026
Labelsjavascript

Hi!

We're great fans for the popular Parcel bundler. At the moment it doesn't support the ESM import syntax for WASM modules, i.e.:

typescript
import { ... } from './yadda.wasm';

We've found (for our own libraries) that there is a way to get broad configuration-less bundler support for wasm, including both Webpack 5 and Parcel out of the box, using the following method instead:

typescript
const wasmUrl = new URL('./yadda.wasm', import.meta.url);
const module = WebAssembly.instantiateStreaming(fetch(wasmUrl), ...);

I wonder if this is something you'd consider? Without it we'd have to fork Automerge in order to use it in out project.

Thank you!