diff options
author | Ilion Beyst <ilion.beyst@gmail.com> | 2021-12-23 18:22:14 +0100 |
---|---|---|
committer | Ilion Beyst <ilion.beyst@gmail.com> | 2021-12-23 18:22:14 +0100 |
commit | c26f72890f934d654742328702661f0bd73b7582 (patch) | |
tree | cdd1fa595c1fce56ae1efbe2e3392045dd6c0bb0 /web/pw-frontend/src | |
parent | 96ee00242f350b391dcc1cf4d72a442c969f565e (diff) | |
download | planetwars.dev-c26f72890f934d654742328702661f0bd73b7582.tar.xz planetwars.dev-c26f72890f934d654742328702661f0bd73b7582.zip |
fix frontend build
Diffstat (limited to 'web/pw-frontend/src')
-rw-r--r-- | web/pw-frontend/src/main.ts | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/web/pw-frontend/src/main.ts b/web/pw-frontend/src/main.ts index eb9e5a0..b9ec466 100644 --- a/web/pw-frontend/src/main.ts +++ b/web/pw-frontend/src/main.ts @@ -1,9 +1,10 @@ import App from './App.svelte' -import load_wasm_module from "planetwars-rs"; +import init_wasm_module from "planetwars-rs"; -load_wasm_module().then(() => { +const wasm_url = new URL("../planetwars-rs/pkg/planetwars_rs_bg.wasm", import.meta.url) + +init_wasm_module(wasm_url).then(() => { const app = new App({ target: document.getElementById('app') }) -}); - +})
\ No newline at end of file |