- vite.config.js: 新增 unplugin-vue-components + ElementPlusResolver;
optimizeDeps.include 动态生成 118 项无扩展名 specifier(glob/.mjs 皆静默失效)
- main.js: 删 app.use(ElementPlus) 与全量 CSS;改 provideGlobalConfig(locale, app, true);
显式引入 4 个函数式组件样式(message/message-box/notification/loading)
- views/Upload.vue: 3 处 h(resolveComponent('el-xxx')) 改显式组件引用;清 2 处死导入
- devDep: unplugin-vue-components@^32.1.0
- .gitignore: 忽略 vite.config.js.timestamp-*.mjs
验证:dist 渲染 9/9 · dist 登录后 9/9 · dev 通道致命错误 0/告警 0
瘦身:首屏 425.1->158.8KB(-62.6%);主包 JS 1112.9->281.09KB
30 lines
716 B
JSON
30 lines
716 B
JSON
{
|
|
"name": "competition-website",
|
|
"version": "1.0.0",
|
|
"private": true,
|
|
"description": "卫星通信与导航应用技术创新赛 - 前端项目",
|
|
"type": "module",
|
|
"scripts": {
|
|
"dev": "vite",
|
|
"build": "vite build",
|
|
"preview": "vite preview"
|
|
},
|
|
"dependencies": {
|
|
"@vueuse/core": "^10.7.0",
|
|
"@wangeditor/editor": "^5.1.23",
|
|
"@wangeditor/editor-for-vue": "^5.1.12",
|
|
"axios": "^1.6.0",
|
|
"element-plus": "^2.5.0",
|
|
"pinia": "^2.1.0",
|
|
"sortablejs": "^1.15.0",
|
|
"spark-md5": "^3.0.2",
|
|
"vue": "^3.4.0",
|
|
"vue-router": "^4.3.0"
|
|
},
|
|
"devDependencies": {
|
|
"@vitejs/plugin-vue": "^5.0.0",
|
|
"unplugin-vue-components": "^32.1.0",
|
|
"vite": "^5.0.0"
|
|
}
|
|
}
|