import { fileURLToPath, URL } from "node:url";
import { defineConfig } from "vite";
import vue from "@vitejs/plugin-vue";
export default defineConfig({
plugins: [vue()],
resolve: {
alias: {
vue: fileURLToPath(new URL("./node_modules/vue/dist/vue.esm-bundler.js", import.meta.url))
},
dedupe: ["vue"]
},
server: {
host: "0.0.0.0",
port: 3006,
proxy: {
"/api": {
target: "http://127.0.0.1:3005",
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api/, "")
}
}
}
});