getWasmModuleCode
Builds the JavaScript module a .wasm import resolves to: the WebAssembly module’s bytes as a Uint8Array default export, inlined as base64, because an Obsidian release ships main.js and nothing beside it.
Import:
import { getWasmModuleCode } from '@mnaoumov/obsidian-dev-toolkit/bundlers/obsidian-plugin-transforms';Signature:
function getWasmModuleCode(bytes: Uint8Array<ArrayBufferLike>): stringParameters:
| Parameter | Type | Description |
|---|---|---|
bytes |
Uint8Array<ArrayBufferLike> | The WebAssembly module’s bytes. |
Returns: string — The module’s code.