micro-app/packages/icpx-file/vite.config.ts.timestamp-1670898945885.mjs
2023-05-30 19:27:03 +08:00

120 lines
23 KiB
JavaScript

// vite.config.ts
import vue from "file:///G:/project/icpx-frame-v2/node_modules/.pnpm/@vitejs+plugin-vue@3.2.0_vite@3.2.1+vue@3.2.37/node_modules/@vitejs/plugin-vue/dist/index.mjs";
import vueJsx from "file:///G:/project/icpx-frame-v2/node_modules/.pnpm/@vitejs+plugin-vue-jsx@2.1.0_vite@3.2.1/node_modules/@vitejs/plugin-vue-jsx/dist/index.mjs";
import { createSvgIconsPlugin } from "file:///G:/project/icpx-frame-v2/node_modules/.pnpm/vite-plugin-svg-icons@2.0.1_vite@3.2.1/node_modules/vite-plugin-svg-icons/dist/index.mjs";
import path from "path";
// build/env.ts
import { loadEnv as _loadEnv } from "file:///G:/project/icpx-frame-v2/node_modules/.pnpm/vite@3.2.1/node_modules/vite/dist/node/index.js";
var loadEnv = (options) => {
const { command, mode } = options;
const isDev = command === "serve";
const env = Object.assign(
{
DEV: isDev,
PROD: !isDev,
VITE_ENV_THEME_DEFAULT: ""
},
_loadEnv(isDev ? "development" : "production", process.cwd(), ""),
_loadEnv(mode, process.cwd(), "")
);
return env;
};
// build/theme-config.ts
import { themePreprocessorPlugin } from "file:///G:/project/icpx-frame-v2/node_modules/.pnpm/@crami+vite-plugin-theme-preprocessor@0.0.2/node_modules/@crami/vite-plugin-theme-preprocessor/dist/index.js";
import { defaultsDeep } from "file:///G:/project/icpx-frame-v2/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/lodash.js";
import colors from "file:///G:/project/icpx-frame-v2/node_modules/.pnpm/colors@1.4.0/node_modules/colors/lib/index.js";
var uuid = `.${new Date().getTime()}`;
// vite.config.ts
var __vite_injected_original_dirname = "G:\\project\\icpx-frame-v2\\packages\\file";
var vite_config_default = ({ command, mode }) => {
const env = loadEnv({ command, mode });
const userConfig = {
base: env.VITE_APP_PUBLIC_PATH,
define: {
"process.env.VUE_APP_API_BASE_URL": JSON.stringify(env.VITE_APP_API_BASE_URL),
"process.env.VUE_APP_PUBLIC_PATH": JSON.stringify(env.VITE_APP_PUBLIC_PATH),
"process.env": env
},
plugins: [
vue(),
vueJsx(),
createSvgIconsPlugin({
iconDirs: [path.resolve(__vite_injected_original_dirname, "./src/assets/ICP")],
symbolId: "icon-[dir]-[name]",
customDomId: "__svg__icons__icp__dom__"
})
],
build: {
cssCodeSplit: false,
chunkSizeWarningLimit: 2048,
rollupOptions: {
output: {
manualChunks: {
vue: ["vue", "vuex", "vue-router"],
antdv: ["ant-design-vue", "@ant-design/icons-vue"],
dayjs: ["dayjs"]
}
}
}
},
resolve: {
alias: [
{ find: "dayjs/locale", replacement: "dayjs/esm/locale" },
{ find: "~@", replacement: path.join(__vite_injected_original_dirname, "./src") },
{ find: "@", replacement: path.join(__vite_injected_original_dirname, "./src") },
{ find: "lodash", replacement: "lodash-es" },
{ find: "ant-design-vue/lib", replacement: "ant-design-vue/es" },
{ find: "@crami/ui/lib", replacement: "@crami/ui/es" },
{ find: "@crami/bui/lib", replacement: "@crami/bui/es" }
]
},
optimizeDeps: {
include: [
"ant-design-vue/es/locale/en_US",
"ant-design-vue/es/locale/zh_CN",
"store/plugins/expire",
"ant-design-vue/es/_util/vue-types",
"ant-design-vue/es/form",
"dayjs",
"dayjs/esm/locale/eu",
"dayjs/esm/locale/zh-cn",
"@ant-design/icons-vue",
"lodash-es",
"@crami/ui",
"@crami/ui-types",
"@crami/bui",
"@crami/bui-types",
"@crami/bui-platform"
]
},
css: {
preprocessorOptions: {
less: {
javascriptEnabled: true
}
}
},
server: {
host: true,
port: 3118,
cors: true,
proxy: {
"/api": {
target: "http://10.0.88.239:51001/",
ws: true,
changeOrigin: true,
rewrite: (path2) => path2.replace(/^\/api/, "")
}
}
}
};
return userConfig;
};
export {
vite_config_default as default
};
//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsidml0ZS5jb25maWcudHMiLCAiYnV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