Zero-config WASM to inline JS bundler. Version 1.0.0 converts a .wasm file into a standalone JavaScript file embedding the binary as Base64, eliminating the need for fetch, CORS headers, or separate hosting. Suitable for both browser and Node.js environments, it provides a simple init function to instantiate the module. Released as a CLI tool and library, it targets small WASM modules and prioritizes simplicity over complex build integration. Differentiates from full build systems like webpack/wasm-pack by being a single-purpose, no-config utility.
npm install wasm-inlinerVerified import paths — ran on the pinned version, not inferred.
Shows how to import the generated bundle and initialize the WASM module with a simple demo function call.
Only use for small WASM modules (<1MB). For larger files, prefer streaming compilation.
Ensure initWasm() is called early and consider using Web Workers for heavy modules.
Pre-process your WASM to use simple exports/imports, or use a more comprehensive bundler like wasm-pack.
Add type="module" to your script tag, or use dynamic import() in Node.
Verify the .wasm file is correct and re-run the inliner on it.
No dependency data recorded yet.