diff --git a/build/vite/index.ts b/build/vite/index.ts index a208c09c..304ce0d5 100644 --- a/build/vite/index.ts +++ b/build/vite/index.ts @@ -14,6 +14,7 @@ import viteCompression from 'vite-plugin-compression' import vueSetupExtend from 'vite-plugin-vue-setup-extend' import VueI18nPlugin from '@intlify/unplugin-vue-i18n/vite' import { createSvgIconsPlugin } from 'vite-plugin-svg-icons' + export function createVitePlugins(VITE_APP_TITLE: string) { const root = process.cwd() // 路径查找 diff --git a/build/vite/optimize.ts b/build/vite/optimize.ts index a4bff7b9..3d90dbac 100644 --- a/build/vite/optimize.ts +++ b/build/vite/optimize.ts @@ -67,7 +67,19 @@ const include = [ 'element-plus/es/components/dropdown/style/index', 'element-plus/es/components/dropdown-menu/style/index', 'element-plus/es/components/dropdown-item/style/index', - 'element-plus/es/components/skeleton/style/index' + 'element-plus/es/components/skeleton/style/index', + 'element-plus/es/components/skeleton/style/css', + 'element-plus/es/components/backtop/style/css', + 'element-plus/es/components/menu/style/css', + 'element-plus/es/components/sub-menu/style/css', + 'element-plus/es/components/menu-item/style/css', + 'element-plus/es/components/dropdown/style/css', + 'element-plus/es/components/tree/style/css', + 'element-plus/es/components/dropdown-menu/style/css', + 'element-plus/es/components/dropdown-item/style/css', + 'element-plus/es/components/badge/style/css', + 'element-plus/es/components/breadcrumb/style/css', + 'element-plus/es/components/breadcrumb-item/style/css' ] const exclude = ['@iconify/json'] diff --git a/src/views/bpm/processInstance/create.vue b/src/views/bpm/processInstance/create.vue index 084c085c..1b59ec7c 100644 --- a/src/views/bpm/processInstance/create.vue +++ b/src/views/bpm/processInstance/create.vue @@ -59,7 +59,7 @@ import { allSchemas } from './process.create' import * as DefinitionApi from '@/api/bpm/definition' import * as ProcessInstanceApi from '@/api/bpm/processInstance' import { setConfAndFields2 } from '@/utils/formCreate' -import { ApiAttrs } from '@form-create/element-ui/types/config' +import type { ApiAttrs } from '@form-create/element-ui/types/config' import { DICT_TYPE } from '@/utils/dict' const router = useRouter() // 路由 diff --git a/vite.config.ts b/vite.config.ts index e5572436..6b54e183 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -31,15 +31,15 @@ export default ({ command, mode }: ConfigEnv): UserConfig => { port: env.VITE_PORT, host: "0.0.0.0", open: env.VITE_OPEN === 'true', - // 本地跨域代理 - proxy: { - ['/admin-api']: { - target: env.VITE_BASE_URL, - ws: false, - changeOrigin: true, - rewrite: (path) => path.replace(new RegExp(`^/admin-api`), ''), - }, - }, + // 本地跨域代理. 目前注释的原因:暂时没有用途,server 端已经支持跨域 + // proxy: { + // ['/admin-api']: { + // target: env.VITE_BASE_URL, + // ws: false, + // changeOrigin: true, + // rewrite: (path) => path.replace(new RegExp(`^/admin-api`), ''), + // }, + // }, }, // 项目使用的vite插件。 单独提取到build/vite/plugin中管理 plugins: createVitePlugins(env.VITE_APP_TITLE),