2024-01-20 08:22:44 +00:00
|
|
|
import { defineConfig } from 'vite';
|
|
|
|
import react from '@vitejs/plugin-react';
|
2024-03-17 16:57:02 +00:00
|
|
|
import { resolve } from 'path';
|
2024-03-20 18:00:23 +00:00
|
|
|
import { TanStackRouterVite } from '@tanstack/router-vite-plugin';
|
2024-01-20 08:22:44 +00:00
|
|
|
|
|
|
|
// https://vitejs.dev/config/
|
|
|
|
export default defineConfig({
|
|
|
|
root: __dirname,
|
2024-03-20 18:00:23 +00:00
|
|
|
plugins: [
|
|
|
|
react(),
|
2024-08-02 16:04:54 +00:00
|
|
|
// @ts-ignore
|
2024-03-20 18:00:23 +00:00
|
|
|
TanStackRouterVite({
|
|
|
|
routesDirectory: './routes',
|
|
|
|
generatedRouteTree: './routeTree.gen.ts',
|
|
|
|
}),
|
|
|
|
],
|
2024-01-20 08:22:44 +00:00
|
|
|
build: {
|
2024-01-28 17:00:35 +00:00
|
|
|
outDir: '../server/public',
|
2024-01-20 08:22:44 +00:00
|
|
|
},
|
2024-03-17 16:57:02 +00:00
|
|
|
resolve: {
|
|
|
|
alias: {
|
|
|
|
'@': resolve(__dirname, './'),
|
|
|
|
},
|
|
|
|
},
|
2024-01-20 08:22:44 +00:00
|
|
|
clearScreen: false,
|
|
|
|
server: {
|
2024-03-09 16:45:01 +00:00
|
|
|
// host: '0.0.0.0',
|
2024-01-20 08:22:44 +00:00
|
|
|
proxy: {
|
2024-01-28 08:40:15 +00:00
|
|
|
'/socket.io': {
|
|
|
|
target: 'ws://localhost:12345',
|
|
|
|
changeOrigin: true,
|
|
|
|
ws: true,
|
|
|
|
},
|
2024-01-20 08:22:44 +00:00
|
|
|
'/trpc': {
|
|
|
|
target: 'http://localhost:12345',
|
|
|
|
},
|
2024-07-30 16:40:04 +00:00
|
|
|
'/api/auth/': {
|
|
|
|
target: 'http://localhost:12345',
|
|
|
|
},
|
2024-01-29 11:58:51 +00:00
|
|
|
'/api/workspace': {
|
|
|
|
target: 'http://localhost:12345',
|
|
|
|
},
|
2024-05-07 16:26:04 +00:00
|
|
|
'/api/website/send': {
|
|
|
|
target: 'http://localhost:12345',
|
|
|
|
},
|
2024-01-20 08:22:44 +00:00
|
|
|
},
|
|
|
|
},
|
|
|
|
});
|