27 lines
672 B
TypeScript
27 lines
672 B
TypeScript
|
|
import { defineConfig } from "vite";
|
||
|
|
import react from "@vitejs/plugin-react";
|
||
|
|
import { tanstackRouter } from "@tanstack/router-plugin/vite";
|
||
|
|
import tailwindcss from "@tailwindcss/vite";
|
||
|
|
import { fileURLToPath } from "url";
|
||
|
|
import path from "path";
|
||
|
|
|
||
|
|
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
||
|
|
|
||
|
|
export default defineConfig({
|
||
|
|
plugins: [tanstackRouter({ autoCodeSplitting: true }), react(), tailwindcss()],
|
||
|
|
resolve: {
|
||
|
|
alias: {
|
||
|
|
"@": path.resolve(__dirname, "./src"),
|
||
|
|
},
|
||
|
|
},
|
||
|
|
server: {
|
||
|
|
proxy: {
|
||
|
|
"/api-proxy": {
|
||
|
|
target: "http://localhost:8000",
|
||
|
|
changeOrigin: true,
|
||
|
|
rewrite: (p) => p.replace(/^\/api-proxy/, ""),
|
||
|
|
},
|
||
|
|
},
|
||
|
|
},
|
||
|
|
});
|