diff options
-rw-r--r-- | web/pw-server/package.json | 3 | ||||
-rw-r--r-- | web/pw-server/src/lib/components/Visualizer.svelte | 3 | ||||
-rw-r--r-- | web/pw-server/svelte.config.js | 2 |
3 files changed, 3 insertions, 5 deletions
diff --git a/web/pw-server/package.json b/web/pw-server/package.json index 25356f5..e8ade9f 100644 --- a/web/pw-server/package.json +++ b/web/pw-server/package.json @@ -31,8 +31,7 @@ "svelte-preprocess": "^4.9.4", "tslib": "^2.3.1", "typescript": "^4.4.3", - "vite-plugin-iso-import": "^0.1.3", - "vite-plugin-wasm-pack": "^0.1.9" + "vite-plugin-iso-import": "^0.1.3" }, "dependencies": { "@fortawesome/free-solid-svg-icons": "^6.2.0", 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; diff --git a/web/pw-server/svelte.config.js b/web/pw-server/svelte.config.js index 02b4db9..769665b 100644 --- a/web/pw-server/svelte.config.js +++ b/web/pw-server/svelte.config.js @@ -1,7 +1,6 @@ import adapter from "@sveltejs/adapter-node"; import sveltePreprocess from "svelte-preprocess"; import { viteCommonjs } from "@originjs/vite-plugin-commonjs"; -import wasmPack from "vite-plugin-wasm-pack"; import { isoImport } from "vite-plugin-iso-import"; import { mdsvex } from "mdsvex"; @@ -27,7 +26,6 @@ const config = { vite: { plugins: [ isoImport(), - wasmPack([], ["planetwars-rs"]), viteCommonjs({ transformMixedEsModules: true, }), |