25 lines
530 B
TypeScript
25 lines
530 B
TypeScript
import path from "path"
|
|
import { fileURLToPath } from "url"
|
|
import react from "@vitejs/plugin-react"
|
|
import tailwindcss from "@tailwindcss/vite"
|
|
import { defineConfig } from "vite"
|
|
|
|
const __dirname = path.dirname(fileURLToPath(import.meta.url))
|
|
|
|
export default defineConfig({
|
|
plugins: [react(), tailwindcss()],
|
|
resolve: {
|
|
alias: {
|
|
"@": path.resolve(__dirname, "./src"),
|
|
},
|
|
},
|
|
server: {
|
|
proxy: {
|
|
"/api": {
|
|
target: "http://localhost:8080",
|
|
changeOrigin: true,
|
|
},
|
|
},
|
|
},
|
|
})
|