-
Notifications
You must be signed in to change notification settings - Fork 85
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(bundler-mako): generate dynamicImportToRequire from babel and webpack config #1479
Conversation
Walkthrough此次更改引入了对 Babel 动态导入的支持,通过配置 Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant BuildSystem
participant Babel
participant Webpack
User->>BuildSystem: Initiate Build
BuildSystem->>Babel: Process Code
Babel->>Webpack: Handle Dynamic Imports
Webpack->>BuildSystem: Generate Output
BuildSystem->>User: Complete Build
Assessment against linked issues
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 (5)
- e2e/fixtures.umi/config.babel-plugin-dynamic-import-node/.umirc.ts (1 hunks)
- e2e/fixtures.umi/config.babel-plugin-dynamic-import-node/async.ts (1 hunks)
- e2e/fixtures.umi/config.babel-plugin-dynamic-import-node/expect.js (1 hunks)
- e2e/fixtures.umi/config.babel-plugin-dynamic-import-node/pages/index.tsx (1 hunks)
- packages/bundler-mako/index.js (4 hunks)
Files skipped from review due to trivial changes (4)
- e2e/fixtures.umi/config.babel-plugin-dynamic-import-node/.umirc.ts
- e2e/fixtures.umi/config.babel-plugin-dynamic-import-node/async.ts
- e2e/fixtures.umi/config.babel-plugin-dynamic-import-node/expect.js
- e2e/fixtures.umi/config.babel-plugin-dynamic-import-node/pages/index.tsx
Additional comments not posted (3)
packages/bundler-mako/index.js (3)
391-393
: 更改已批准:添加对dynamic-import-node
插件的检查。此更改符合 PR 的目标,确保函数识别额外的插件类别,不会触发警告。
452-457
: 更改已批准:处理asyncChunks
配置。此更改增强了输出设置的可配置性,符合 PR 的目标。
534-539
: 更改已批准:将babel-plugin-dynamic-import-node
转换为dynamicImportToRequire
。此更改改进了动态导入的处理,符合 PR 的目标。
建议验证此更改与代码库其他部分的集成。
Verification successful
验证通过:
dynamicImportToRequire
已在代码库中成功集成。
dynamicImportToRequire
在多个关键文件中出现,包括配置文件、文档和源代码,表明其已被充分集成和记录。无需进一步操作。Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the integration of `dynamicImportToRequire` in the codebase. # Test: Search for `dynamicImportToRequire` usage. Expect: Consistent integration across the codebase. rg --type javascript -A 5 $'dynamicImportToRequire'Length of output: 85
Script:
#!/bin/bash # Description: Re-verify the integration of `dynamicImportToRequire` in the codebase. # Test: Search for `dynamicImportToRequire` usage. Expect: Consistent integration across the codebase. rg -A 5 'dynamicImportToRequire'Length of output: 4626
支持将 Webpack 的
output.asyncChunks
配置以及 Umi 此前在用的babel-plugin-dynamic-import-node
转成 Mako 的dynamicImportToRequire
配置项Close #1470
Summary by CodeRabbit
新功能
修复
测试