rwsdk
Version:
Build fast, server-driven webapps on Cloudflare with SSR, RSC, and realtime
15 lines (14 loc) • 484 B
JavaScript
export const wasmPlugin = () => {
return {
name: "rwsdk:wasm",
resolveId(id) {
console.log("######", id);
if (id.startsWith("@id/__CLOUDFLARE_MODULE__CompiledWasm__") &&
id.endsWith(".wasm__")) {
const r = id.slice("@id/__CLOUDFLARE_MODULE__CompiledWasm__".length, id.length - "__".length);
console.log("##################33", r);
return r;
}
},
};
};