feat(pack): support config jsx runtime by tsconfig - #2590
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! 此拉取请求旨在增强 Highlights
Changelog
Activity
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
|
a4c2086 to
2882e4f
Compare
📊 Performance Benchmark Report (with-antd)Utoopack Performance ReportReport ID: Executive SummaryKey Findings
Workload Distribution by Tier
Parallelization AnalysisThread Utilization
Assessment: With 5 working threads, achieving 3.1x parallelism indicates significant loss of potential parallelism. Top 20 Tasks by Total Duration
Deep Dive by TierTier 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.
Tier 3: Architecture & Asset Pipeline (P2-P3)Focus: Global state and transformation pipeline.
Duration Distribution
Diagnostic Signal Summary
Action Items (P0-P4)
Report generated by Utoopack Performance Analysis Agent on 2026-02-11 |
| enable_typeof_window_inlining: None, | ||
| enable_jsx: Some(jsx_transform_options), | ||
| enable_typescript_transform: Some(tsconfig), | ||
| ..module_options_context.ecmascript |
There was a problem hiding this comment.
这不对吧?foreign codes 应该用自己包内的 tsconfig ?

Summary
支持通过
tsconfig.json里面的 compilerOptions.jsx 来设置 utoopack 处理 jsx 的方式。turbopack 需要支持 next.js 框架行为,该配置并没有打开,且所有的场景 jsx runtime 默认都为
automatic,参考: https://github.com/vercel/next.js/blob/canary/crates/next-core/src/transform_options.rs#L170-L173一些场景下 utoopack 需要按照
classic的方式来编译 node_modules 中的依赖产物:如图为某项目的代码产物,这类需要按照 classic 的方式来进行 jsx 编译。
utoopack 需要一个配置来设置 jsx 的 runtime 类型,目前先暂定从
tsconfig.json的compilerOptions.jsx里面读取来转换(跟 tsx 的行为保持一致),后续需要单独的配置再考虑开出去。Test Plan
在快照测试: #2588 的基础上做了一些调整