From 5c20f19c8aee925f24e80bea9f3c2198a47b14a9 Mon Sep 17 00:00:00 2001 From: Ilion Beyst Date: Mon, 7 Nov 2022 22:01:43 +0100 Subject: use native vite features for including wasm --- web/pw-server/src/lib/components/Visualizer.svelte | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'web/pw-server/src') 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; -- cgit v1.2.3