26 lines
565 B
TypeScript
26 lines
565 B
TypeScript
import { defineConfig } from "vite";
|
|
import react from "@vitejs/plugin-react";
|
|
import path from "node:path";
|
|
|
|
const apiPort = Number(process.env.TALLYNOTE_PORT ?? 3000);
|
|
|
|
export default defineConfig({
|
|
root: "web-next",
|
|
resolve: {
|
|
alias: { "@": path.resolve(process.cwd(), "web-next/src") },
|
|
},
|
|
plugins: [react()],
|
|
server: {
|
|
host: "127.0.0.1",
|
|
port: 5173,
|
|
proxy: {
|
|
"/api": `http://127.0.0.1:${apiPort}`,
|
|
"/health": `http://127.0.0.1:${apiPort}`,
|
|
},
|
|
},
|
|
build: {
|
|
outDir: "../dist/web",
|
|
emptyOutDir: true,
|
|
},
|
|
});
|