2023-08-25 18:48:17 -04:00
|
|
|
import { defineConfig } from 'vite';
|
|
|
|
import { svelte } from '@sveltejs/vite-plugin-svelte';
|
|
|
|
import { fileURLToPath, URL } from 'node:url';
|
2023-07-19 23:38:24 -04:00
|
|
|
|
|
|
|
// https://vitejs.dev/config/
|
|
|
|
export default defineConfig({
|
2023-08-23 21:44:59 -04:00
|
|
|
server: {
|
2023-08-26 19:55:27 -04:00
|
|
|
host: '0.0.0.0',
|
2023-08-23 21:44:59 -04:00
|
|
|
proxy: {
|
2023-08-25 18:48:17 -04:00
|
|
|
'/api': {
|
2023-08-26 19:55:27 -04:00
|
|
|
target: 'http://10.0.0.237:8080',
|
2023-08-23 21:44:59 -04:00
|
|
|
ws: true,
|
2023-08-25 18:48:17 -04:00
|
|
|
rewrite: (path) => path.replace(/^\/api/, '')
|
|
|
|
}
|
|
|
|
}
|
2023-08-23 21:44:59 -04:00
|
|
|
},
|
|
|
|
cors: true,
|
2023-07-19 23:38:24 -04:00
|
|
|
plugins: [svelte()],
|
2023-07-20 23:47:32 -04:00
|
|
|
resolve: {
|
|
|
|
alias: {
|
2023-08-25 18:48:17 -04:00
|
|
|
'@engine': fileURLToPath(new URL('../engine', import.meta.url))
|
|
|
|
}
|
|
|
|
}
|
2023-07-20 23:47:32 -04:00
|
|
|
});
|