Files
SearcjGal-frontend/package.json
AdingApkgg 3d414157a0 依赖升级 + 代码质量、打包体积与组件结构优化
依赖:
- pnpm update --latest(vite、vue、eslint、typescript 等 14 个包到最新版)
- 显式加入 vue-eslint-parser ^10.4.0 / workbox-build ^7.4.1,消除 peer 警告

代码质量:
- 修复 ESLint vue parser 配置(用 vue-eslint-parser 作主 parser),lint 错误 17 → 0
- tsconfig 启用 noUncheckedIndexedAccess,修复 16 个潜在 undefined 访问 bug
- 删除未使用的 src/utils/icons.ts(723 行死代码)

打包体积:
- PWA precache 10.5 MB / 424 项 → 740 KB / 24 项(字体改为运行时缓存)
- vendor CSS gzip 201 KB → 141 KB(禁用字体 base64 内联,保留 unicode-range 子集策略)
- Artalk CSS 跟随 CommentsModal 异步加载
- 字体精简:移除未使用的 300 字重,补上用到的 600
- 删除僵尸的 fancybox manualChunks 配置

健壮性:
- SSE 搜索新增 AbortController + 60s 超时,新搜索取消旧请求,组件卸载取消进行中
- settings 持久化加 300ms 防抖 + QuotaExceededError 处理 + beforeunload 强制落盘

组件拆分:
- SearchHeader.vue 1330 → 1061 行,抽出 SearchErrorCard 子组件
- SettingsModal.vue 1289 → 1171 行,抽出 AdvancedApiSettings 子组件

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-14 07:23:19 +08:00

46 lines
1.2 KiB
JSON

{
"name": "searchgal-frontend",
"private": true,
"version": "1.0.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "vue-tsc --noEmit && vite build",
"preview": "vite preview",
"typecheck": "vue-tsc --noEmit",
"lint": "eslint .",
"lint:fix": "eslint . --fix",
"check": "vue-tsc --noEmit && eslint ."
},
"devDependencies": {
"@eslint/js": "^10.0.1",
"@tailwindcss/vite": "^4.3.0",
"@types/node": "^25.7.0",
"@typescript-eslint/eslint-plugin": "^8.59.3",
"@typescript-eslint/parser": "^8.59.3",
"@vitejs/plugin-vue": "^6.0.6",
"eslint": "^10.3.0",
"eslint-plugin-vue": "^10.9.1",
"tailwindcss": "^4.3.0",
"typescript": "^6.0.3",
"typescript-eslint": "^8.59.3",
"vite": "^8.0.12",
"vite-plugin-pwa": "^1.3.0",
"vue-eslint-parser": "^10.4.0",
"vue-tsc": "^3.2.9",
"workbox-build": "^7.4.1",
"workbox-window": "^7.4.1"
},
"dependencies": {
"@fontsource/noto-sans-sc": "^5.2.9",
"@tanstack/vue-virtual": "^3.13.24",
"artalk": "^2.9.1",
"lucide-vue-next": "^1.0.0",
"pinia": "^3.0.4",
"prismjs": "^1.30.0",
"vue": "^3.5.34",
"vue-prism-editor": "2.0.0-alpha.2"
},
"packageManager": "pnpm@10.33.0"
}