import vue from "@vitejs/plugin-vue";
import Components from "unplugin-vue-components/vite";
import { VantResolver } from "@vant/auto-import-resolver";

export default {
  plugins: [
    vue(),
    Components({
      resolvers: [VantResolver()],
    }),
  ],
  server: {
    proxy: {
      //https://api-mall.mihoyogift.com/
      "/myp": {
        target: "https://api-mall.mihoyogift.com",
        changeOrigin: true,
        rewrite: (path) => path.replace(/^\/myp/, ""),
      },
    },
  },
};
