import vue from "@vitejs/plugin-vue"; import { defineConfig } from "vite"; import { fileURLToPath, URL } from "node:url"; // https://vitejs.dev/config/ export default defineConfig({ plugins: [vue()], define: { "process.env": {} }, resolve: { alias: { "@": fileURLToPath(new URL("./src", import.meta.url)), }, extensions: [".js", ".json", ".jsx", ".mjs", ".ts", ".tsx", ".vue"], }, server: { port: 3000, proxy: { "/v1": { target: "http://127.0.0.1:5000", changeOrigin: true, rewrite: (path) => path.replace(/^\/v1/, ""), }, }, }, build: { sourcemap: true, }, });