31 lines
741 B
TypeScript
31 lines
741 B
TypeScript
|
|
import tailwindcss from "@tailwindcss/vite"
|
||
|
|
import react from "@vitejs/plugin-react"
|
||
|
|
import { defineConfig, loadEnv } from "vite"
|
||
|
|
|
||
|
|
export default defineConfig(({ mode }) => {
|
||
|
|
const environment = loadEnv(mode, process.cwd(), "")
|
||
|
|
|
||
|
|
return {
|
||
|
|
plugins: [react(), tailwindcss()],
|
||
|
|
resolve: {
|
||
|
|
alias: {
|
||
|
|
"@": `${import.meta.dirname}/src`,
|
||
|
|
},
|
||
|
|
},
|
||
|
|
server: {
|
||
|
|
host: "0.0.0.0",
|
||
|
|
port: 5173,
|
||
|
|
proxy: {
|
||
|
|
"/api": {
|
||
|
|
changeOrigin: true,
|
||
|
|
target: environment.VITE_DEV_API_TARGET ?? "http://localhost:8000",
|
||
|
|
},
|
||
|
|
"/healthz": {
|
||
|
|
changeOrigin: true,
|
||
|
|
target: environment.VITE_DEV_API_TARGET ?? "http://localhost:8000",
|
||
|
|
},
|
||
|
|
},
|
||
|
|
},
|
||
|
|
}
|
||
|
|
})
|