Trigger immediate `.wasm` instantiation and caching control
mainBy default, the .wasm binary is only fetched and instantiated when a readBarcodes or writeBarcode function is first called.
To explicitly trigger the download and instantiation immediately (e.g., during app startup), set fireImmediately: true in prepareZXingModule. When fireImmediately is true, prepareZXingModule returns a Promise that resolves to the underlying Emscripten module.
To force a re-fetch and re-instantiation (bypassing the default equality check on overrides), provide a custom equalityFn that always returns false.
prepareZXingModule({
overrides: {
/* ... your desired overrides ... */
},
fireImmediately: true,
equalityFn: () => false, // force re-fetch and re-instantiate
});