import { defineConfig } from "vite";
import vue from "@vitejs/plugin-vue";
import { resolve } from "path";
import ElementPlus from "unplugin-element-plus/vite";

// https://vitejs.dev/config/
export default defineConfig({
  plugins: [
    vue(),
    ElementPlus({
      // options
    }),
  ],
  resolve: {
    alias: {
      // vue: resolve(`./node_modules/vue`),
      "@": resolve("./src"),
    },
  },
  server: {
    proxy: {
      "^/api": {
        target: "http://183.134.99.140:46790/",
        // target: "https://sy.8n.cn/api",
        changeOrigin: true,
      },
    },
  },
});
