aboutsummaryrefslogtreecommitdiff
path: root/web/pw-server/src
diff options
context:
space:
mode:
authorIlion Beyst <ilion.beyst@gmail.com>2022-11-07 22:01:43 +0100
committerIlion Beyst <ilion.beyst@gmail.com>2022-11-07 22:01:43 +0100
commit5c20f19c8aee925f24e80bea9f3c2198a47b14a9 (patch)
tree3be4d3f33706adef55420db895034cb7584e2483 /web/pw-server/src
parent06fa72fe1cb542823ccf1b5847ff55dd5d47903a (diff)
downloadplanetwars.dev-5c20f19c8aee925f24e80bea9f3c2198a47b14a9.tar.xz
planetwars.dev-5c20f19c8aee925f24e80bea9f3c2198a47b14a9.zip
use native vite features for including wasm
Diffstat (limited to 'web/pw-server/src')
-rw-r--r--web/pw-server/src/lib/components/Visualizer.svelte3
1 files changed, 2 insertions, 1 deletions
diff --git a/web/pw-server/src/lib/components/Visualizer.svelte b/web/pw-server/src/lib/components/Visualizer.svelte
index 4fe8ab4..eac1c52 100644
--- a/web/pw-server/src/lib/components/Visualizer.svelte
+++ b/web/pw-server/src/lib/components/Visualizer.svelte
@@ -2,6 +2,7 @@
import { onDestroy, onMount } from "svelte";
import * as visualizer from "pw-visualizer";
import init_wasm_module from "planetwars-rs";
+ import planetwars_wasm_module from "planetwars-rs/planetwars_rs_bg.wasm?url";
import { PLAYER_COLORS } from "$lib/constants";
export let matchLog = null;
@@ -10,7 +11,7 @@
let initialized = false;
onMount(async () => {
- await init_wasm_module();
+ await init_wasm_module(planetwars_wasm_module);
visualizer.init();
initialized = true;