- 新增 hzhub-portal-employee 员工门户前端项目(基于 Vue3 + Element Plus) - 后端登录接口增加返回 nickName 字段 - 移除 KnowledgeInfoController 的 @SaCheckPermission 注解 - 删除 hzhub-portal-company 旧门户项目 - 更新项目文档和架构说明 - 添加后台运行管理脚本(start-all.sh / status-all.sh / stop-all.sh) - 更新 docker-compose 配置 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
40 lines
1.1 KiB
TypeScript
40 lines
1.1 KiB
TypeScript
import type { ConfigEnv, PluginOption } from 'vite';
|
|
import path from 'node:path';
|
|
import vue from '@vitejs/plugin-vue';
|
|
import UnoCSS from 'unocss/vite';
|
|
import AutoImport from 'unplugin-auto-import/vite';
|
|
import { ElementPlusResolver } from 'unplugin-vue-components/resolvers';
|
|
import Components from 'unplugin-vue-components/vite';
|
|
import envTyped from 'vite-plugin-env-typed';
|
|
import createSvgIcon from './svg-icon';
|
|
|
|
const root = path.resolve(__dirname, '../../');
|
|
|
|
function plugins({ mode, command }: ConfigEnv): PluginOption[] {
|
|
return [
|
|
UnoCSS(),
|
|
envTyped({
|
|
mode,
|
|
envDir: root,
|
|
envPrefix: 'VITE_',
|
|
filePath: path.join(root, 'types', 'import_meta.d.ts'),
|
|
}),
|
|
vue(),
|
|
AutoImport({
|
|
imports: ['vue'],
|
|
eslintrc: {
|
|
enabled: true,
|
|
},
|
|
resolvers: [ElementPlusResolver()],
|
|
dts: path.join(root, 'types', 'auto-imports.d.ts'),
|
|
}),
|
|
Components({
|
|
resolvers: [ElementPlusResolver()],
|
|
dts: path.join(root, 'types', 'components.d.ts'),
|
|
}),
|
|
createSvgIcon(command === 'build'),
|
|
];
|
|
}
|
|
|
|
export default plugins;
|