MCPcopy Create free account
hub / github.com/Zoo-Code-Org/Zoo-Code / wasmPlugin

Function wasmPlugin

webview-ui/vite.config.ts:23–35  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

21}
22
23const wasmPlugin = (): Plugin => ({
24 name: "wasm",
25 async load(id) {
26 if (id.endsWith(".wasm")) {
27 const wasmBinary = await import(id)
28
29 return `
30 const wasmModule = new WebAssembly.Module(${wasmBinary.default});
31 export default wasmModule;
32 `
33 }
34 },
35})
36
37const persistPortPlugin = (): Plugin => ({
38 name: "write-port-to-file",

Callers 1

vite.config.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected