-
Notifications
You must be signed in to change notification settings - Fork 366
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
refactor: remove random querystrings from extension build artifacts #5404
Conversation
Review or Edit in CodeSandboxOpen the branch in Web Editor • VS Code • Insiders |
PR Summary
|
Walkthrough此次更改包括在 Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant Server
participant HTMLTemplate
Client->>Server: 请求页面
Server->>Server: 调用 createEjsParams()
Server->>Server: 获取 process.env.VERSION
Server->>HTMLTemplate: 返回包含 currentVersion 的参数
HTMLTemplate->>Client: 返回页面
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Outside diff range comments (1)
packages/shared/src/web/index.html.ejs (1)
Line range hint
1-124
: 建议:整理代码提高可读性文件结构不错,但可以更好:
- 把平台相关代码分组
- 用注释解释复杂的条件语句
- 考虑把大块CSS移到单独文件
这些改动会让代码更易读、维护。
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
📒 Files selected for processing (3)
- development/indexHtmlParameter.js (1 hunks)
- development/webpack/ext/pluginsHtml.js (1 hunks)
- packages/shared/src/web/index.html.ejs (1 hunks)
🔇 Additional comments (2)
development/webpack/ext/pluginsHtml.js (1)
34-34
: 好改动!提高了生产构建的一致性。这个改动很棒。只在开发环境中设置
hash: true
确保了生产构建的一致性。这有助于解决 Mozilla 插件商店的接受问题。简单有效!packages/shared/src/web/index.html.ejs (1)
39-39
: 好改动!版本号替代时间戳。用
currentVersion
替换Date.now()
很棒。这样做能让构建结果更稳定,有利于Mozilla商店接受扩展。
Amending the querystrings used in the extension build so that the the build artifacts have consistent hashes. This should enable the extension to be accepted by the Mozilla addons store.
#3351
Summary by CodeRabbit
新功能
currentVersion
属性,以提供当前版本信息。改进
NODE_ENV
条件设置hash
属性,优化插件配置。