42 lines
870 B
TypeScript
42 lines
870 B
TypeScript
import tailwindcss from "@tailwindcss/vite";
|
|
import { devtools } from "@tanstack/devtools-vite";
|
|
|
|
import { tanstackStart } from "@tanstack/react-start/plugin/vite";
|
|
|
|
import viteReact from "@vitejs/plugin-react";
|
|
import { defineConfig } from "vite";
|
|
|
|
const config = defineConfig({
|
|
resolve: { tsconfigPaths: true },
|
|
plugins: [
|
|
devtools(),
|
|
tailwindcss(),
|
|
tanstackStart({
|
|
spa: {
|
|
enabled: true
|
|
}
|
|
}),
|
|
viteReact({
|
|
babel: {
|
|
plugins: ["babel-plugin-react-compiler"],
|
|
},
|
|
}),
|
|
],
|
|
server: {
|
|
allowedHosts: ["aura.rpi1.danbulant.cloud"],
|
|
proxy: {
|
|
"/api": {
|
|
target: "http://localhost:4000",
|
|
changeOrigin: true,
|
|
rewrite: (path) => path.replace(/^\/api/, "/api"),
|
|
},
|
|
"/api/party-socket/ws": {
|
|
target: "ws://localhost:4000",
|
|
ws: true,
|
|
rewriteWsOrigin: true,
|
|
},
|
|
},
|
|
},
|
|
});
|
|
|
|
export default config;
|