mirror of
https://github.com/samuelncui/yatm.git
synced 2026-01-03 11:45:21 +00:00
27 lines
563 B
TypeScript
27 lines
563 B
TypeScript
import { defineConfig, loadEnv } from "vite";
|
|
import react from "@vitejs/plugin-react";
|
|
|
|
// https://vitejs.dev/config/
|
|
export default defineConfig(({ command, mode }) => {
|
|
const env = loadEnv(mode, process.cwd(), "");
|
|
|
|
return {
|
|
plugins: [react()],
|
|
build: {
|
|
target: "es2020",
|
|
},
|
|
optimizeDeps: {
|
|
esbuildOptions: {
|
|
target: "es2020",
|
|
},
|
|
},
|
|
server: {
|
|
proxy: {
|
|
// target http://localhost:5173
|
|
"/services": env.DEV_SERVICE_BASE,
|
|
"/files": env.DEV_SERVICE_BASE,
|
|
},
|
|
},
|
|
};
|
|
});
|