// vite.config.ts
import path from "node:path";
import { defineConfig } from "file:///C:/Users/EDY/Desktop/work/aimooc/mobile/node_modules/.pnpm/registry.npmmirror.com+vite@5.0.8_sass@1.62.1_terser@5.26.0/node_modules/vite/dist/node/index.js";
import Vue from "file:///C:/Users/EDY/Desktop/work/aimooc/mobile/node_modules/.pnpm/registry.npmmirror.com+@vitejs+plugin-vue@4.5.2_vite@5.0.8_vue@3.3.11/node_modules/@vitejs/plugin-vue/dist/index.mjs";
import Pages from "file:///C:/Users/EDY/Desktop/work/aimooc/mobile/node_modules/.pnpm/registry.npmmirror.com+vite-plugin-pages@0.32.0_vite@5.0.8/node_modules/vite-plugin-pages/dist/index.js";
import Components from "file:///C:/Users/EDY/Desktop/work/aimooc/mobile/node_modules/.pnpm/registry.npmmirror.com+unplugin-vue-components@0.25.2_vue@3.3.11/node_modules/unplugin-vue-components/dist/vite.mjs";
import AutoImport from "file:///C:/Users/EDY/Desktop/work/aimooc/mobile/node_modules/.pnpm/registry.npmmirror.com+unplugin-auto-import@0.16.7_@vueuse+core@10.7.0/node_modules/unplugin-auto-import/dist/vite.js";
import UnoCSS from "file:///C:/Users/EDY/Desktop/work/aimooc/mobile/node_modules/.pnpm/registry.npmmirror.com+unocss@0.58.0_postcss@8.4.32_vite@5.0.8/node_modules/unocss/dist/vite.mjs";
import VueMacros from "file:///C:/Users/EDY/Desktop/work/aimooc/mobile/node_modules/.pnpm/registry.npmmirror.com+unplugin-vue-macros@2.7.2_@vueuse+core@10.7.0_typescript@5.3.3_vite@5.0.8_vue@3.3.11/node_modules/unplugin-vue-macros/dist/vite.mjs";
import { VantResolver } from "file:///C:/Users/EDY/Desktop/work/aimooc/mobile/node_modules/.pnpm/registry.npmmirror.com+unplugin-vue-components@0.25.2_vue@3.3.11/node_modules/unplugin-vue-components/dist/resolvers.mjs";
import legacyPlugin from "file:///C:/Users/EDY/Desktop/work/aimooc/mobile/node_modules/.pnpm/registry.npmmirror.com+@vitejs+plugin-legacy@4.1.1_terser@5.26.0_vite@5.0.8/node_modules/@vitejs/plugin-legacy/dist/index.mjs";
var __vite_injected_original_dirname = "C:\\Users\\EDY\\Desktop\\work\\aimooc\\mobile";
var vite_config_default = defineConfig({
  base: "",
  resolve: {
    alias: {
      "~/": `${path.resolve(__vite_injected_original_dirname, "src")}/`
    }
  },
  server: {
    hmr: { overlay: false },
    // 禁用或配置 HMR 连接 设置 server.hmr.overlay 为 false 可以禁用服务器错误遮罩层
    port: 9901
  },
  plugins: [
    legacyPlugin({
      targets: ["chrome 52"],
      // 需要兼容的目标列表，可以设置多个
      additionalLegacyPolyfills: ["regenerator-runtime/runtime"]
      // 面向IE11时需要此插件
    }),
    VueMacros({
      defineOptions: false,
      defineModels: false,
      plugins: {
        vue: Vue({
          script: {
            propsDestructure: true,
            defineModel: true
          }
        })
      }
    }),
    // https://github.com/hannoeru/vite-plugin-pages
    Pages(
      {
        dirs: "src/pages",
        exclude: ["**/components/*.vue"]
      }
    ),
    // https://github.com/antfu/unplugin-auto-import
    AutoImport({
      imports: [
        "vue",
        "vue/macros",
        "vue-router",
        "@vueuse/core"
      ],
      dts: true,
      dirs: [
        "./src/composables",
        "./src/request",
        "./src/utils"
      ],
      vueTemplate: true,
      resolvers: []
    }),
    // https://github.com/antfu/vite-plugin-components
    Components({
      dirs: ["src/components/"],
      // allow auto load markdown components under `./src/components/`
      extensions: ["vue", "md"],
      // allow auto import and register components used in markdown
      include: [/\.vue$/, /\.vue\?vue/, /\.md$/],
      resolvers: [VantResolver()]
    }),
    // https://github.com/antfu/unocss
    // see uno.config.ts for config
    // WindiCSS(),
    UnoCSS()
  ]
  // https://github.com/vitest-dev/vitest
  // test: {
  //   environment: 'jsdom',
  // },
});
export {
  vite_config_default as default
};
//# sourceMappingURL=data:application/json;base64,[encoded data, 5904 characters]
