// vite.config.js
import { fileURLToPath, URL } from "node:url";
import AutoImport from "file:///D:/Code/qnc/front/qnc-webview-tob/node_modules/.pnpm/unplugin-auto-import@0.18.5_@vueuse+core@11.3.0_vue@3.5.13__rollup@4.27.3/node_modules/unplugin-auto-import/dist/vite.js";
import Components from "file:///D:/Code/qnc/front/qnc-webview-tob/node_modules/.pnpm/unplugin-vue-components@0.27.5_@babel+parser@7.26.2_rollup@4.27.3_vue@3.5.13/node_modules/unplugin-vue-components/dist/vite.js";
import { VantResolver } from "file:///D:/Code/qnc/front/qnc-webview-tob/node_modules/.pnpm/@vant+auto-import-resolver@1.2.1/node_modules/@vant/auto-import-resolver/dist/index.esm.mjs";
import { defineConfig } from "file:///D:/Code/qnc/front/qnc-webview-tob/node_modules/.pnpm/vite@5.4.11_sass-embedded@1.81.0/node_modules/vite/dist/node/index.js";
import vue from "file:///D:/Code/qnc/front/qnc-webview-tob/node_modules/.pnpm/@vitejs+plugin-vue@5.2.0_vite@5.4.11_sass-embedded@1.81.0__vue@3.5.13/node_modules/@vitejs/plugin-vue/dist/index.mjs";
import vueJsx from "file:///D:/Code/qnc/front/qnc-webview-tob/node_modules/.pnpm/@vitejs+plugin-vue-jsx@4.1.0_vite@5.4.11_sass-embedded@1.81.0__vue@3.5.13/node_modules/@vitejs/plugin-vue-jsx/dist/index.mjs";
import vueDevTools from "file:///D:/Code/qnc/front/qnc-webview-tob/node_modules/.pnpm/vite-plugin-vue-devtools@7.6.4_rollup@4.27.3_vite@5.4.11_sass-embedded@1.81.0__vue@3.5.13/node_modules/vite-plugin-vue-devtools/dist/vite.mjs";
var __vite_injected_original_import_meta_url = "file:///D:/Code/qnc/front/qnc-webview-tob/vite.config.js";
var vite_config_default = defineConfig({
  server: {
    host: "0.0.0.0",
    // 设置为 0.0.0.0 允许局域网访问
    port: 5679,
    // 自定义端口号，可选
    strictPort: true,
    // 如果端口被占用则抛出错误而不是使用下一个可用端口
    proxy: {
      // "/api/v1": {
      //     target: "https://www.quannengcha.com", // 本地接口地址
      //     changeOrigin: true,
      // },
      "/api/v1/chat": {
        target: "https://www.tianyuandb.com",
        // 本地接口地址
        changeOrigin: true
        // rewrite: (path) => path.replace(/^\/api\/v1\/chat/, '/chat')
      },
      "/api/v1": {
        target: "https://6m4685017o.goho.co",
        // 本地接口地址
        changeOrigin: true
      }
    }
  },
  plugins: [
    vue(),
    AutoImport({
      imports: [
        "vue",
        // 自动引入 Vue Composition API，如 ref、computed、onMounted 等
        "vue-router",
        // 自动引入 vue-router 中的方法，如 useRoute、useRouter 等（可选）
        "@vueuse/core"
        // 自动引入 VueUse 中的工具函数（可选）
      ],
      dts: "src/auto-imports.d.ts",
      // 生成类型定义文件（可选）
      dirs: ["src/composables", "src/stores", "src/components"],
      resolvers: [VantResolver()]
    }),
    Components({
      resolvers: [VantResolver()]
    }),
    vueJsx()
    // vueDevTools(),
  ],
  resolve: {
    alias: {
      "@": fileURLToPath(new URL("./src", __vite_injected_original_import_meta_url))
    }
  }
});
export {
  vite_config_default as default
};
//# sourceMappingURL=data:application/json;base64,[encoded data, 5256 characters]
