build: 使用兼容生产环境的前端构建流程 #14
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "codex/production-vite-compat-0917"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
问题与结果
生产服务器是旧内核,
rolldown-vite在 Node 22 容器中无法解析正常存在的配置和入口文件。前端改用标准 Vite 7.2.7,并增加deploy/production/build-frontend.sh:源码在 Node 22 容器内部临时目录构建,只将验证后的dist写回服务器。实际证据
Cannot resolve entry module vite.config.js和index.html。npm ci后确认实际加载vite@7.2.7;lint、16 项测试、生产构建全部通过。dist/__build_version__.json的完整提交 SHA,避免部署错误产物。不涉及数据库、运行配置或业务逻辑变更。