-
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(bundler-mako): analyze don't work in umi #1387
Conversation
Walkthrough本次变更主要涉及优化 Changes
Sequence Diagram(s)不适用,本次变更中没有涉及复杂的新特性或控制流程的修改。 Assessment against linked issues
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 Configration 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 (3)
- crates/mako/src/generate/analyze.rs (1 hunks)
- crates/mako/src/generate/mod.rs (2 hunks)
- packages/bundler-mako/index.js (3 hunks)
Files skipped from review due to trivial changes (1)
- crates/mako/src/generate/mod.rs
Additional comments not posted (5)
crates/mako/src/generate/analyze.rs (3)
34-34
: 更改报告文件名以提高清晰度将报告文件名从
report.html
更改为analyze-report.html
有助于更好地理解报告的用途。
35-35
: 使用引用提高代码清晰度在
fs::write
函数中使用引用以提高代码的清晰度和一致性。
36-39
: 添加打印语句以显示生成的报告路径添加打印语句可以帮助调试和验证报告生成路径。
packages/bundler-mako/index.js (2)
Line range hint
93-93
:
更新checkConfig
函数以支持analyze
配置
checkConfig
函数不再将'config.analyze'
视为风险项,表明analyze
配置现在被认为是稳定和受支持的。
443-443
: 更新getMakoConfig
函数以处理analyze
配置
getMakoConfig
函数现在在解构opts.config
时包含analyze
,并根据process.env.ANALYZE
环境变量设置analyze
。此更改确保analyze
配置得到正确处理,并且可以通过环境变量进行控制。Also applies to: 609-609
Close #1364
Summary by CodeRabbit
新功能
analyze-report.html
,更加清晰明了。改进
配置管理
checkConfig
函数中删除了config.analyze
的风险检查。getMakoConfig
函数中增加了analyze
配置项,支持基于环境变量ANALYZE
设置。