chore: add vite.config.ts

This commit is contained in:
notshop 2026-04-26 16:36:24 +00:00
parent 306001a607
commit d9bad7d636

26
vite.config.ts Normal file
View file

@ -0,0 +1,26 @@
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
import path from "path";
export default defineConfig({
plugins: [react()],
root: path.resolve(import.meta.dirname, "client"),
build: {
outDir: path.resolve(import.meta.dirname, "dist/public"),
emptyOutDir: true,
},
resolve: {
alias: {
"@": path.resolve(import.meta.dirname, "client/src"),
"@shared": path.resolve(import.meta.dirname, "shared"),
},
},
server: {
proxy: {
"/api": {
target: "http://localhost:5000",
changeOrigin: true,
},
},
},
});