feat: setup web/ for tanstack router frontend

This commit is contained in:
2025-09-13 11:30:11 -05:00
parent ac2638dd9a
commit 6f831f5fa6
23 changed files with 5227 additions and 0 deletions
+32
View File
@@ -0,0 +1,32 @@
import { defineConfig } from "vite";
import viteReact from "@vitejs/plugin-react";
import tanstackRouter from "@tanstack/router-plugin/vite";
import { resolve } from "node:path";
// https://vitejs.dev/config/
export default defineConfig({
plugins: [tanstackRouter({ autoCodeSplitting: true }), viteReact()],
test: {
globals: true,
environment: "jsdom",
},
resolve: {
alias: {
"@": resolve(__dirname, "./src"),
},
},
server: {
port: 3000,
proxy: {
"/api": {
target: "http://localhost:8080",
changeOrigin: true,
secure: false,
},
},
},
build: {
outDir: "dist",
sourcemap: true,
},
});