mirror of
https://github.com/tursodatabase/limbo.git
synced 2025-12-23 08:21:09 +00:00
8 lines
No EOL
373 B
JavaScript
8 lines
No EOL
373 B
JavaScript
import { readFileSync, writeFileSync } from "node:fs";
|
|
|
|
const data = readFileSync(process.env.WASM_FILE);
|
|
const b64 = data.toString("base64");
|
|
const dataUrl = "data:application/wasm;base64," + b64;
|
|
const inlined = readFileSync(process.env.JS_FILE).toString("utf8");
|
|
const replaced = inlined.replace("__PLACEHOLDER__", dataUrl);
|
|
writeFileSync(process.env.JS_FILE, replaced); |