Skip to content

Commit

Permalink
feat: 依赖升级
Browse files Browse the repository at this point in the history
  • Loading branch information
sincely committed Dec 16, 2024
1 parent 294c422 commit 13acf35
Show file tree
Hide file tree
Showing 5 changed files with 4,865 additions and 9 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,13 @@ package-lock.json
pnpm-lock.yaml
yarn.lock

status.html


# IDE
.idea

auto-imports.d.ts
components.d.ts

status.html
3 changes: 2 additions & 1 deletion build/plugins/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import prefetchPlugin from './preload' // 预加载
import restartPlugin from './restart' // 重启服务
import htmlPlugin from './html' // html插件
import svgIconPlugin from './svgIcon' // svg图标集成
import visualizer from './visualizer' // 可视化分析
/**
* @description 创建vite插件
* @param viteEnv - 环境变量配置
Expand All @@ -18,7 +19,7 @@ import svgIconPlugin from './svgIcon' // svg图标集成
export default function createVitePlugins(viteEnv, isBuild = false) {
const vitePlugins = [vue(), mock(viteEnv), ...unplugin(), restartPlugin(), svgIconPlugin()]
if (isBuild) {
vitePlugins.push(compression(), legacy(), progress(), htmlPlugin())
vitePlugins.push(compression(), legacy(), progress(), htmlPlugin(), visualizer(viteEnv))
} else {
vitePlugins.push(
inspect(),
Expand Down
9 changes: 9 additions & 0 deletions build/plugins/visualizer.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { visualizer } from 'rollup-plugin-visualizer'
export default function visualizerPlugin() {
return visualizer({
open: true, // 在默认用户代理中打开生成的文件
gzipSize: true, // 收集 gzip 大小并将其显示
brotliSize: true, // 收集 brotli 大小并将其显示
filename: 'status.html' // 分析图生成的文件名
})
}
16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,18 @@
"prepare": "husky install"
},
"dependencies": {
"axios": "1.6.5",
"axios": "1.6.8",
"terser": "5.26.0",
"dayjs": "1.11.10",
"mitt": "3.0.1",
"moment": "2.29.4",
"mockjs": "1.1.0",
"js-cookie": "3.0.5",
"nprogress": "0.2.0",
"pinia": "2.1.7",
"pinia-plugin-persistedstate": "3.2.0",
"lodash-es": "4.17.21",
"unplugin-auto-import": "0.17.2",
"unplugin-icons": "0.18.1",
"unplugin-auto-import": "0.17.8",
"unplugin-icons": "0.18.5",
"unplugin-vue-components": "0.26.0",
"vite-plugin-compression": "0.5.1",
"vite-plugin-html": "3.2.0",
Expand All @@ -39,9 +38,10 @@
"vite-plugin-progress": "0.0.7",
"vite-plugin-svg-icons": "2.0.1",
"vite-svg-loader": "4.0.0",
"vite-plugin-restart": "0.4.0",
"vite-plugin-vue-devtools": "7.0.27",
"vue": "3.3.13",
"vite-plugin-restart": "0.4.2",
"vite-plugin-vue-devtools": "7.6.8",
"rollup-plugin-visualizer": "5.12.0",
"vue": "3.4.38",
"vue-router": "4.2.5"
},
"devDependencies": {
Expand Down Expand Up @@ -74,7 +74,7 @@
"stylelint-config-standard-less": "2.0.0",
"stylelint-less": "2.0.0",
"stylelint-order": "6.0.4",
"vite": "4.5.3",
"vite": "4.5.5",
"vue-eslint-parser": "9.3.2"
}
}
Loading

0 comments on commit 13acf35

Please sign in to comment.