Files
TallyNote/vite.config.ts
Qiufeng 12495fb6a4
TallyNote release / linux-x64 (push) Successful in 6m24s
release: 1.1.0
2026-08-31 20:11:34 +08:00

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,
},
});