From 4b6718311fe3f9ba82d058ae869c4132c215d151 Mon Sep 17 00:00:00 2001 From: Eduard Klimenko Date: Fri, 13 Dec 2024 18:51:23 +0200 Subject: [PATCH] fix: BASE_URL for includes on worker.ts --- src/app/wiregasm.worker.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/app/wiregasm.worker.ts b/src/app/wiregasm.worker.ts index 8c29288..4de7465 100644 --- a/src/app/wiregasm.worker.ts +++ b/src/app/wiregasm.worker.ts @@ -5,7 +5,7 @@ // postMessage(response); // }); - +const BASE_URL_WIREGASM_LIB = 'wiregasm-lib/'; // load the Wiregasm library and pako @@ -14,12 +14,12 @@ // if you are not compressing the wasm and data files, you do not need to include pako // // import * from '../wiregasm-lib' -// import wiregasm from "../wiregasm-lib/wiregasm.js"; -// import pako from "../wiregasm-lib/pako.js"; +// import wiregasm from BASE_URL_WIREGASM_LIB + "wiregasm.js"; +// import pako from BASE_URL_WIREGASM_LIB + "pako.js"; importScripts( - "../wiregasm-lib/wiregasm.js", - "../wiregasm-lib/pako.js" + BASE_URL_WIREGASM_LIB + "wiregasm.js", + BASE_URL_WIREGASM_LIB + "pako.js" ); @@ -40,10 +40,10 @@ const fetchPackages = async () => { console.log("Fetching packages"); let [wasm, data] = await Promise.all([ await inflateRemoteBuffer( - "../wiregasm-lib/wiregasm.wasm.gz" + BASE_URL_WIREGASM_LIB + "wiregasm.wasm.gz" ), await inflateRemoteBuffer( - "../wiregasm-lib/wiregasm.data.gz" + BASE_URL_WIREGASM_LIB + "wiregasm.data.gz" ), ]);