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

feat: enable mako ⚡ #11326

Merged
merged 7 commits into from
Oct 9, 2024
Merged

feat: enable mako ⚡ #11326

merged 7 commits into from
Oct 9, 2024

Conversation

afc163
Copy link
Member

@afc163 afc163 commented Aug 30, 2024

https://umijs.org/docs/api/config#mako

https://makojs.dev/

Summary by CodeRabbit

  • 新功能

    • 引入了新的配置选项,以增强使用mako框架的开发体验。
  • 错误修复

    • 移除了过时的mfsu配置,以简化构建过程。
  • 杂项

    • 通过移除不必要的属性,简化了代理配置。

Copy link

coderabbitai bot commented Aug 30, 2024

Walkthrough

这些更改涉及在 config/config.ts 文件中移除 mfsu 配置选项,并引入新的 mako 选项,表明开发框架的转变。此外,config/proxy.ts 文件中的 mako 属性被移除,从而简化了代理配置。这些修改反映了项目构建策略和代理设置的重新组织。

Changes

Files Change Summary
config/config.ts 移除 mfsu 配置;添加 mako 配置以支持快速开发。
config/proxy.ts 从默认导出对象中移除 mako 属性,简化配置。

Poem

在草地上,变化轻快,
Mako 跳跃,mfsu 说再见。
为建设者铺就新路,
每一步都向前飞跃。
为这些转变欢呼吧,
进步在快乐中绽放!🐇✨


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 4228e80 and c8220a0.

📒 Files selected for processing (1)
  • config/config.ts (1 hunks)
🧰 Additional context used
🔇 Additional comments (1)
config/config.ts (1)

160-165: 启用 Mako 并评估其影响

新增的 mako 配置项表明项目正在采用 Mako 进行极速研发,这可能会带来性能和开发效率的提升。然而,我们需要注意以下几点:

  1. 建议在代码注释或文档中说明从 mfsu 切换到 mako 的原因,以便团队成员理解这一变更的动机。

  2. 鉴于移除了 mfsu 配置,请务必评估这一变更对构建性能和项目功能的影响。建议进行全面的测试,确保不会出现意外的副作用。

  3. 目前 mako 配置为空对象 {}。如果 Mako 需要特定的配置选项,建议在此处添加,以充分利用 Mako 的功能。

  4. 考虑添加一个 TODO 注释,提醒在未来的迭代中完善 Mako 的配置(如果当前的空配置只是一个起点)。

为了验证这一变更的影响,请运行以下脚本:

这将帮助我们了解 mfsumako 的迁移是否完整,以及是否需要在其他地方进行相应的调整。

✅ Verification successful

验证通过:mfsu 已被移除,mako 已成功启用

根据执行的脚本结果,项目中已无 mfsu 的使用痕迹,同时 mako 已在 config/config.ts 中正确配置。这表明从 mfsumako 的迁移已完整实施。

建议:

  • 进行全面的构建和功能测试,确保新配置不会引入任何副作用。
  • 根据项目需求完善 mako 的配置选项,以充分利用其优势。
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# 描述:检查项目中是否还有 mfsu 的使用痕迹,以及 mako 的使用情况

echo "检查 mfsu 的使用情况:"
rg --type ts --type js 'mfsu'

echo "\n检查 mako 的使用情况:"
rg --type ts --type js 'mako'

echo "\n检查构建脚本中的变化:"
rg --type ts --type js 'build|compile|webpack|esbuild'

Length of output: 801


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?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

github-actions bot commented Aug 30, 2024

🎊 PR Preview has been successfully built and deployed to https://ant-design-pro-preview-pr-11326.surge.sh

Copy link

@coderabbitai coderabbitai bot left a 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

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 3e59c41 and 4228e80.

Files selected for processing (2)
  • config/config.ts (2 hunks)
  • config/proxy.ts (1 hunks)
Files skipped from review due to trivial changes (1)
  • config/proxy.ts
Additional comments not posted (1)
config/config.ts (1)

150-155: Verify the completeness of the mako configuration.

The addition of the mako configuration aligns with the PR objectives to enable rapid development using the Mako framework. However, the configuration block is empty. Please verify if this is intentional or if additional parameters are required for optimal integration.

The code changes are approved.

Consider verifying the completeness of the mako configuration by consulting the Mako documentation or relevant project requirements.

Comment on lines +150 to +155
/**
* @name 是否开启 mako
* @description 使用 mako 极速研发
* @doc https://umijs.org/docs/api/config#mako
*/
mako: {},
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assess the impact of removing mfsu.

The removal of the mfsu configuration option marks a significant change in the project's build strategy. It is crucial to assess the impact of this change on the build performance and ensure that all dependencies and project requirements are still being met.

Consider conducting a thorough impact analysis to verify that the removal of mfsu does not adversely affect the project's build process or performance.

@afc163
Copy link
Member Author

afc163 commented Aug 30, 2024

windows 还不支持。@sorrycc @stormslowly

@afc163 afc163 changed the title feat: enable mako feat: enable mako ⚡ Oct 9, 2024
@afc163 afc163 merged commit db2631e into master Oct 9, 2024
22 checks passed
@afc163 afc163 deleted the feat/enable-mako branch October 9, 2024 03:57
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