2026-04-02 09:23:57 +08:00
|
|
|
import { fileURLToPath, URL } from "node:url"
|
|
|
|
|
import { defineConfig } from "vite"
|
|
|
|
|
import react from "@vitejs/plugin-react"
|
|
|
|
|
import tailwindcss from "@tailwindcss/vite"
|
|
|
|
|
|
|
|
|
|
// https://vite.dev/config/
|
|
|
|
|
export default defineConfig({
|
|
|
|
|
plugins: [react(), tailwindcss()],
|
|
|
|
|
base: "/",
|
|
|
|
|
resolve: {
|
|
|
|
|
alias: {
|
|
|
|
|
"@": fileURLToPath(new URL("./src", import.meta.url)),
|
|
|
|
|
},
|
|
|
|
|
},
|
2026-04-14 11:17:31 +08:00
|
|
|
server: {
|
|
|
|
|
proxy: {
|
|
|
|
|
'/api': {
|
|
|
|
|
target: 'http://localhost:8080',
|
|
|
|
|
changeOrigin: true,
|
|
|
|
|
rewrite: (path) => path.replace(/^\/api/, '')
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2026-04-02 09:23:57 +08:00
|
|
|
})
|