refactor(build): 移除 setup-extend 插件并更新依赖项
- 移除 createSetupExtend 插件及其相关配置 - 更新 Vue 版本从 3.5.13 到 3.5.25 - 更新 Element Plus 版本从 2.12.0 到 2.14.1 - 添加 @vue/shared 依赖 - 移除 @vue/compiler-sfc 开发依赖 - 移除 unplugin-vue-setup-extend-plus 依赖 - 更新 @babel 相关依赖版本 - 移除 @esbuild 相关可选依赖 - 更新 chokidar 版本从 3.6.0 到 5.0.0 - 移除部分已废弃的依赖项
This commit is contained in:
@@ -3,36 +3,11 @@ import vue from '@vitejs/plugin-vue'
|
||||
import createAutoImport from './auto-import'
|
||||
import createSvgIcon from './svg-icon'
|
||||
import createCompression from './compression'
|
||||
import createSetupExtend from './setup-extend'
|
||||
|
||||
export default function createVitePlugins(viteEnv, isBuild = false) {
|
||||
const vitePlugins = [vue()]
|
||||
vitePlugins.push(createAutoImport())
|
||||
vitePlugins.push(createSetupExtend())
|
||||
vitePlugins.push(createSvgIcon(isBuild))
|
||||
// 住院代码影响打包 打包时暂时替换为空文件
|
||||
// 新增排除住院管理模块的插件
|
||||
// vitePlugins.push({
|
||||
// name: 'exclude-in-hospital-management',
|
||||
// enforce: 'pre',
|
||||
// load(id) {
|
||||
// const normalizedPath = id.replace(/\\/g, '/')
|
||||
// if (normalizedPath.includes('/src/views/inHospitalManagement/')
|
||||
// || normalizedPath.includes('/src/views/inpatientDoctor/')
|
||||
// || normalizedPath.includes('/src/views/inpatientNurse/')) {
|
||||
// return {
|
||||
// code: `
|
||||
// <template>
|
||||
// </template>
|
||||
// <script>
|
||||
// </script>
|
||||
// `,
|
||||
// map: null
|
||||
// }
|
||||
// }
|
||||
// return null
|
||||
// }
|
||||
// })
|
||||
isBuild && vitePlugins.push(...createCompression(viteEnv))
|
||||
return vitePlugins
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user