Skip to content

Commit

Permalink
fix cursed script import paths
Browse files Browse the repository at this point in the history
  • Loading branch information
PgBiel committed Dec 21, 2024
1 parent da61a55 commit 7dca7f6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion static/compiler.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
let compiler;

export default async function initGleamCompiler() {
const wasm = await import("compiler/glistix_wasm.js");
const wasm = await import("./compiler/glistix_wasm.js");
await wasm.default();
wasm.initialise_panic_hook();
if (!compiler) {
Expand Down
4 changes: 3 additions & 1 deletion static/worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@ console.log = (...args) => {
};

async function loadProgram(js) {
// URL to worker.js ('base/worker.js')
const url = new URL(import.meta.url);
url.pathname = "";
// Remove 'worker.js', keep just 'base/'
url.pathname = url.pathname.substring(0, url.pathname.lastIndexOf("/") + 1);
url.hash = "";
url.search = "";
const href = url.toString();
Expand Down

0 comments on commit 7dca7f6

Please sign in to comment.