// vite.config.ts
import { defineConfig } from "file:///D:/eolink/applatform/frontend/node_modules/.pnpm/vite@5.2.12_@types+node@20.14.2_less@4.2.0/node_modules/vite/dist/node/index.js";
import react from "file:///D:/eolink/applatform/frontend/node_modules/.pnpm/@vitejs+plugin-react@4.3.0_vite@5.2.12_@types+node@20.14.2_less@4.2.0_/node_modules/@vitejs/plugin-react/dist/index.mjs";
import path from "path";
import dynamicImportVars from "file:///D:/eolink/applatform/frontend/node_modules/.pnpm/@rollup+plugin-dynamic-import-vars@2.1.2_rollup@4.18.0/node_modules/@rollup/plugin-dynamic-import-vars/dist/es/index.js";
import tailwindcss from "file:///D:/eolink/applatform/frontend/node_modules/.pnpm/tailwindcss@3.4.4/node_modules/tailwindcss/lib/index.js";
import autoprefixer from "file:///D:/eolink/applatform/frontend/node_modules/.pnpm/autoprefixer@10.4.19_postcss@8.4.38/node_modules/autoprefixer/lib/autoprefixer.js";
var __vite_injected_original_dirname = "D:\\eolink\\applatform\\frontend\\packages\\businessEntry";
var vite_config_default = defineConfig({
  cacheDir: "./node_modules/.vite",
  build: {
    outDir: "../../dist",
    sourcemap: false,
    chunkSizeWarningLimit: 5e4,
    cacheDir: "./node_modules/.vite",
    output: {
      manualChunks(id) {
        if (id.includes("node_modules")) {
          return id.toString().split("node_modules/")[1].split("/")[0].toString();
        }
        if (id.includes(".pnpm")) {
          const segments = id.split(path.sep);
          const packageName = segments[segments.indexOf(".pnpm") + 1].split("@")[0];
          return packageName;
        }
      }
    }
  },
  css: {
    postcss: {
      plugins: [
        tailwindcss(path.resolve(__vite_injected_original_dirname, "../common/tailwind.config.js")),
        autoprefixer
      ]
    },
    preprocessorOptions: {
      less: {
        javascriptEnabled: true
      }
    },
    modules: {
      localsConvention: "camelCase",
      generateScopedName: "[local]_[hash:base64:2]"
    }
  },
  plugins: [
    react(),
    dynamicImportVars({
      include: ["src"],
      exclude: [],
      warnOnError: false
    })
  ],
  resolve: {
    alias: [
      { find: /^~/, replacement: "" },
      { find: "@common", replacement: path.resolve(__vite_injected_original_dirname, "../common/src") },
      { find: "@market", replacement: path.resolve(__vite_injected_original_dirname, "../market/src") },
      { find: "@core", replacement: path.resolve(__vite_injected_original_dirname, "../core/src") },
      { find: "@dashboard", replacement: path.resolve(__vite_injected_original_dirname, "../dashboard/src") },
      { find: "@openApi", replacement: path.resolve(__vite_injected_original_dirname, "../openApi/src") },
      { find: "@systemRunning", replacement: path.resolve(__vite_injected_original_dirname, "../systemRunning/src") },
      { find: "@businessEntry", replacement: path.resolve(__vite_injected_original_dirname, "./src") }
    ]
  },
  server: {
    proxy: {
      "/api/v1": {
        // target: 'http://uat.apikit.com:11204/mockApi/aoplatform/',
        target: "http://172.18.166.219:8288/",
        changeOrigin: true
      },
      "/api2/v1": {
        // target: 'http://uat.apikit.com:11204/mockApi/aoplatform/',
        target: "http://172.18.166.219:8288/",
        changeOrigin: true
      }
    }
  },
  logLevel: "info"
});
export {
  vite_config_default as default
};
//# sourceMappingURL=data:application/json;base64,[encoded data, 6804 characters]
