-
Notifications
You must be signed in to change notification settings - Fork 74
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
fix: chunk file name should be url-friendly #1434
Conversation
Walkthrough此次更改优化了 Changes
Sequence Diagram(s)(此部分省略,因为变更过于简单,没有生成相应的序列图) Poem
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 as PR comments)
Additionally, you can add 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: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- crates/mako/src/generate/chunk.rs (1 hunks)
Additional comments not posted (3)
crates/mako/src/generate/chunk.rs (3)
77-77
: 更改Component::ParentDir
的处理方式将
Component::ParentDir
的处理从@
更改为_pd_
,使其更符合 URL 友好标准。
78-78
: 更改Component::Prefix
的处理方式将
Component::Prefix
的处理从@
更改为_ps_
,使其更符合 URL 友好标准。
81-82
: 优化Component::Normal
的处理逻辑将
Component::Normal
中的'.'
,'?'
,'@'
替换为下划线'_'
,以提高段名称的清晰度和一致性。
Component::ParentDir => "_pd_".to_string(), | ||
Component::Prefix(_) => "_ps_".to_string(), |
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.
pd 能理解是 parent dir,ps 是啥?
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.
好像是起始路径,start,cc @stormslowly
修复配置
moduleIdStrategy: 'named'
时生成的 chunk 文件名可能包含@
的问题,文件名被 encode 可能会导致 CDN 资源访问失败Summary by CodeRabbit