6076e174d5
问题原因: - 上一次提交添加的 optimizeDeps.include 让 Vite 在启动阶段 就硬解析 element-plus, 包安装不完整时直接崩 (服务器起不来) - predev 脚本每次清缓存, 如果源包有问题则重建必然失败 修正: - 移除 optimizeDeps.include, Vite 自动发现预构建即可 - predev 改为可选的 dev:clean 脚本, 不影响正常启动 - start.sh 加固: 检查 element-plus/es/index.mjs 是否存在 不存在则自动 npm install 影响范围: - 其他服务器 git pull 后, start.sh 会自动检测并安装缺失依赖 - 正常 npm run dev 不再每次清缓存, 启动更快
Vue 3 + Vite
This template should help get you started developing with Vue 3 in Vite. The template uses Vue 3 <script setup> SFCs, check out the script setup docs to learn more.
Learn more about IDE Support for Vue in the Vue Docs Scaling up Guide.