planetwars.dev/web/pw-frontend/vite.config.js

27 lines
592 B
JavaScript
Raw Normal View History

2021-12-22 13:59:13 +01:00
import { defineConfig } from 'vite'
import { svelte } from '@sveltejs/vite-plugin-svelte'
2021-12-23 18:22:14 +01:00
import { viteCommonjs } from '@originjs/vite-plugin-commonjs'
2021-12-23 19:25:56 +01:00
import wasmPack from 'vite-plugin-wasm-pack';
2021-12-22 13:59:13 +01:00
// https://vitejs.dev/config/
export default defineConfig({
plugins: [
svelte(),
2021-12-23 19:25:56 +01:00
wasmPack(["./planetwars-rs"]),
2021-12-23 18:22:14 +01:00
viteCommonjs({
transformMixedEsModules: true,
}),
2021-12-22 13:59:13 +01:00
],
2021-12-23 18:22:14 +01:00
build: {
commonjsOptions: {
transformMixedEsModules: true,
},
2021-12-25 20:28:10 +01:00
},
server: {
proxy: {
"/api/": "http://localhost:5000",
2021-12-27 22:18:46 +01:00
"/ws": "ws://localhost:5000/ws",
2021-12-25 20:28:10 +01:00
},
2021-12-23 18:22:14 +01:00
},
2021-12-22 13:59:13 +01:00
})