feat(pack): support output.entryRootExport#2550
Conversation
Summary of ChangesHello @fireairforce, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request enhances the Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces a new output.exposeEntryExports configuration option. When enabled, this feature exposes the exports of the entry module to the global scope, making them accessible via a global variable. The changes include adding the configuration option, updating the client chunking context, and adding a new example and snapshot tests to validate the functionality.
The implementation appears to be correct for its purpose. My main feedback is to improve the clarity of the documentation for the new exposeEntryExports option in both pack-core and pack-schema. The current description could be misinterpreted. I've left specific suggestions to make it more precise about how the exports are exposed (as a single library object on the global scope, rather than polluting the global namespace with individual exports).
4fff6b2 to
6bc956b
Compare
6bc956b to
ceb8e0c
Compare
ceb8e0c to
1d163bc
Compare
📊 Performance Benchmark Report (with-antd)🚀 Utoopack Performance Report: Async Task Scheduling Overhead AnalysisReport ID: 📊 Executive SummaryThis report analyzes the performance of Utoopack/Turbopack, covering the full spectrum of the Performance Analysis Protocol (P0-P4). Key Findings
Workload Distribution by Tier
⚡ Parallelization Analysis (P0-P2)Thread Utilization
Assessment: With 14 threads available, achieving 8.7x parallelism indicates significant loss of potential parallelism. 📈 Top 20 Tasks (Global)These are the most significant tasks by total duration:
🔍 Deep Dive by Tier🔴 Tier 1: Runtime & Resolution (P0)Focus: Task scheduling and dependency resolution.
Potential P0 Issues:
🟠 Tier 2: Physical & Resource Barriers (P1)Focus: Hardware utilization, I/O, and heavy monoliths.
Potential P1 Issues:
🟡 Tier 3: Architecture & Asset Pipeline (P2-P3)Focus: Global state and transformation pipeline.
💡 Recommendations (Prioritized P0-P2)🚨 Critical: (P0) ImprovementProblem: 62.0% thread utilization.
|
| Signal | Status | Finding |
|---|---|---|
| Tracing Noise (P0) | 60.8% of tasks < 10µs | |
| Thread Utilization (P0) | ✅ Good | 62.0% utilization |
| Heavy Monoliths (P1) | 16 tasks > 100ms | |
| Asset Pipeline (P3) | 🔍 Review | 4,491.6 ms total |
| Bridge/Interop (P4) | ✅ Low | 0.0 ms total |
🎯 Action Items (Comprehensive P0-P4)
- [P0] Profile lock contention to address 37% lost parallelism
- [P1] Breakdown heavy monolith tasks (>100ms) to improve granularity
- [P1] Review I/O patterns for potential batching opportunities
- [P3] Optimize asset transformation pipeline hot-spots
- [P4] Reduce "chatty" bridge operations if interop overhead is significant
Report generated by Utoopack Performance Analysis Agent on 2026-02-02
Following: Utoopack Performance Analysis Agent Protocol
|
library 下不允许配这个吧?加个校验 |
配置了不会生效而已,现在有很多这一类的配置,都需要校验吗?目前 utoopack 的这个配置也只是用来适配 qiankun 应用而已,不会给用户单独去使用... 现在 library 这个格式基本不会被单独使用: #2467 library 构建目前运行时也还有许多其他适配的地方,现在 father 的 utoopack 还维持在一个比较低的版本,升级不上去。 |
|
感觉要不放一个 experimental 配置,这个后面应该也不是主流用法。
还有哪些配置配了不会生效? |
Summary
closes: #2532
ref pr: utooland/next.js#108
添加一个配置:
开启之后 utoopack 的产物格式会按照 webpack library 的导出格式来构造,适配 qiankun 需要的产物格式
Test Plan
添加了快照测试。