34 lines
739 B
TypeScript
34 lines
739 B
TypeScript
import { defineConfig } from "vite";
|
|
import { devtools } from "@tanstack/devtools-vite";
|
|
import viteReact from "@vitejs/plugin-react";
|
|
import tailwindcss from "@tailwindcss/vite";
|
|
|
|
import { tanstackRouter } from "@tanstack/router-plugin/vite";
|
|
import { fileURLToPath, URL } from "node:url";
|
|
|
|
// https://vitejs.dev/config/
|
|
export default defineConfig({
|
|
plugins: [
|
|
devtools(),
|
|
tanstackRouter({
|
|
target: "react",
|
|
autoCodeSplitting: true,
|
|
}),
|
|
viteReact(),
|
|
tailwindcss(),
|
|
],
|
|
resolve: {
|
|
alias: {
|
|
"@": fileURLToPath(new URL("./src", import.meta.url)),
|
|
},
|
|
},
|
|
server: {
|
|
proxy: {
|
|
"/api": {
|
|
target: "http://127.0.0.1:8080",
|
|
changeOrigin: true,
|
|
},
|
|
},
|
|
},
|
|
});
|