39 lines
749 B
TypeScript
39 lines
749 B
TypeScript
|
|
import path from "path"
|
||
|
|
|
||
|
|
import tailwindcss from "@tailwindcss/vite"
|
||
|
|
import { tanstackRouter } from "@tanstack/router-plugin/vite"
|
||
|
|
import react from "@vitejs/plugin-react"
|
||
|
|
import { defineConfig } from "vite"
|
||
|
|
|
||
|
|
// https://vite.dev/config/
|
||
|
|
export default defineConfig({
|
||
|
|
plugins: [
|
||
|
|
tanstackRouter({
|
||
|
|
target: "react",
|
||
|
|
autoCodeSplitting: true,
|
||
|
|
}),
|
||
|
|
react(),
|
||
|
|
tailwindcss(),
|
||
|
|
],
|
||
|
|
resolve: {
|
||
|
|
alias: {
|
||
|
|
"@": path.resolve(__dirname, "./src"),
|
||
|
|
},
|
||
|
|
},
|
||
|
|
build: {
|
||
|
|
chunkSizeWarningLimit: 2048,
|
||
|
|
},
|
||
|
|
server: {
|
||
|
|
proxy: {
|
||
|
|
"/api": {
|
||
|
|
target: "http://localhost:18800",
|
||
|
|
changeOrigin: true,
|
||
|
|
},
|
||
|
|
"/ws": {
|
||
|
|
target: "ws://localhost:18800",
|
||
|
|
ws: true,
|
||
|
|
},
|
||
|
|
},
|
||
|
|
},
|
||
|
|
})
|