refactor: move dwn wasm build to pkg directory

This commit is contained in:
Prad Nukala
2024-09-30 00:13:58 -04:00
parent 9fcdfe5243
commit 4a76f105af
9 changed files with 9 additions and 12 deletions
+16
View File
@@ -0,0 +1,16 @@
importScripts(
"https://cdn.jsdelivr.net/gh/golang/go@go1.22.5/misc/wasm/wasm_exec.js",
"https://cdn.jsdelivr.net/gh/nlepage/go-wasm-http-server@v1.1.0/sw.js",
);
registerWasmHTTPListener("/app.wasm");
// Skip installed stage and jump to activating stage
self.addEventListener("install", (event) => {
event.waitUntil(skipWaiting());
});
// Start controlling clients as soon as the SW is activated
self.addEventListener("activate", (event) => {
event.waitUntil(clients.claim());
});