27 lines
579 B
TypeScript
27 lines
579 B
TypeScript
|
|
import tailwindcss from "@tailwindcss/vite";
|
||
|
|
import react from "@vitejs/plugin-react";
|
||
|
|
import path from "path";
|
||
|
|
import { defineConfig } from "vite";
|
||
|
|
import dotenv from "dotenv";
|
||
|
|
|
||
|
|
dotenv.config({ path: path.resolve(__dirname, "../../.env") });
|
||
|
|
const port = process.env.PORT || 3005;
|
||
|
|
|
||
|
|
// https://vite.dev/config/
|
||
|
|
export default defineConfig({
|
||
|
|
plugins: [react(), tailwindcss()],
|
||
|
|
build: {
|
||
|
|
outDir: "build",
|
||
|
|
},
|
||
|
|
server: {
|
||
|
|
proxy: {
|
||
|
|
"/api": `http://0.0.0.0:${port}`,
|
||
|
|
},
|
||
|
|
},
|
||
|
|
resolve: {
|
||
|
|
alias: {
|
||
|
|
"@": path.resolve(__dirname, "./src"),
|
||
|
|
},
|
||
|
|
},
|
||
|
|
});
|