1 Star 0 Fork 44

墨斗鱼/jecloud-pc-workflow

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
vite.config.js 1.10 KB
一键复制 编辑 原始数据 按行查看 历史
linzhichao 提交于 2024-03-26 22:59 . build(plugin): 优化构建插件
import { defineConfig } from 'vite';
import { usePlugins } from './build/vite/plugins';
import { configProxy } from './build/vite/proxy';
const utils = require('./build/utils');
export default defineConfig(({ command, mode }) => {
const { loadEnvs, resolve, getPublicPath } = utils;
// 加载系统配置
const config = loadEnvs(mode);
const { VUE_APP_SERVICE_PORT } = config;
// 加载插件
const options = usePlugins(config, command);
return {
...options,
base: getPublicPath(config),
resolve: {
alias: {
'@': resolve('src'),
'@micro': resolve('service/micro'),
'@admin': resolve('service/admin'),
'@common': resolve('service/common'),
'@build': resolve('build'),
'vue-i18n': 'vue-i18n/dist/vue-i18n.cjs.js',
},
},
envPrefix: 'VUE_APP_',
server: {
host: '0.0.0.0',
port: VUE_APP_SERVICE_PORT,
proxy: configProxy(config),
},
optimizeDeps: {
include: [
'ant-design-vue/es/locale/zh_CN',
'ant-design-vue/es/locale/en_US',
'@ant-design/icons-vue',
],
},
};
});
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/ink_fish/jecloud-pc-workflow.git
git@gitee.com:ink_fish/jecloud-pc-workflow.git
ink_fish
jecloud-pc-workflow
jecloud-pc-workflow
master

搜索帮助