Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Abnormal film and television network #2977

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

Perverted-brother
Copy link

尽量按此模板PR内容,或粘贴相关的ISSUE链接。

已知问题

  1. (示例)版本号管理不规范
    • 版本号直接写在环境变量中,容易出错
    • 多处维护版本号,可能不一致

解决方案

  1. (示例)将版本号管理从 .env.local 迁移到 package.json
    • 统一从 package.json 读取版本号
    • 使用 IIFE 优雅处理版本号获取逻辑
    • 保持向后兼容,支持环境变量覆盖

改动收益

  1. (示例)更规范的版本管理
    • 统一从 package.json 读取
    • 保持与 npm 生态一致
    • 减少人为错误

具体改动

  1. (示例)blog.config.js
    • 移除原有的静态版本号配置
    • 在文件末尾添加动态版本号获取逻辑
    • 保持向后兼容,优先使用环境变量
    • 添加错误处理和默认值

测试确认

  • 本地开发环境测试通过
  • 生产环境构建测试通过
  • 版本号正确显示
  • 环境变量配置正常工作

Copy link

vercel bot commented Nov 15, 2024

@Perverted-brother is attempting to deploy a commit to the tangly1024's projects Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant