From 0c6d978442b244ca3f29c1ffdd44b5007ae7ad93 Mon Sep 17 00:00:00 2001 From: Ilion Beyst Date: Wed, 29 Dec 2021 21:24:57 +0100 Subject: separate out visualizer library --- web/pw-visualizer/vite.config.js | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 web/pw-visualizer/vite.config.js (limited to 'web/pw-visualizer/vite.config.js') diff --git a/web/pw-visualizer/vite.config.js b/web/pw-visualizer/vite.config.js new file mode 100644 index 0000000..61eed3e --- /dev/null +++ b/web/pw-visualizer/vite.config.js @@ -0,0 +1,24 @@ +import { defineConfig } from 'vite' +import { viteCommonjs } from '@originjs/vite-plugin-commonjs' +import wasmPack from 'vite-plugin-wasm-pack'; + +// https://vitejs.dev/config/ +export default defineConfig({ + plugins: [ + wasmPack([], ["planetwars-rs"]), + viteCommonjs({ + transformMixedEsModules: true, + }), + ], + build: { + commonjsOptions: { + transformMixedEsModules: true, + }, + }, + server: { + proxy: { + "/api/": "http://localhost:5000", + "/ws": "ws://localhost:5000/ws", + }, + }, +}) -- cgit v1.2.3