feat(pack): support mdx option#2858
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces support for Rust-based MDX transformations across the codebase. Key changes include updating the core configuration structures, integrating MDX options into both client and server module contexts, and expanding the public schema in Rust, TypeScript, and JSON formats to support MDX settings. Additionally, a new snapshot test has been added to verify basic MDX compilation. Feedback focuses on critical serialization issues in the Config struct; specifically, the mdx field requires serde_self_describing for bincode compatibility, and the MdxOptions enum needs to derive Serialize instead of Encode/Decode to prevent compilation failures.
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
875bcfd to
5bfe739
Compare
📊 Performance Benchmark Report (with-antd)Utoopack Performance ReportReport ID: Executive Summary
Build Phase TimelineShows when each build phase is active and how much CPU it consumes.
Workload Distribution by Diagnostic Tier
Top 20 Tasks by Self-TimeSelf-time is the exclusive duration: time spent in the task itself, not in sub-tasks.
Critical Path AnalysisThe longest sequential dependency chains that determine wall-clock time.
Batching CandidatesHigh-volume tasks dominated by a single parent. If the parent can batch them,
Duration Distribution
Action Items
Report generated by Utoopack Performance Analysis Agent |
Resolves overlap with merged upstream PRs: - #2856 rustls + aws-lc-rs (gated to macOS only, prevents Linux regression) - #2862 single-flight manifest fetches via OnceMap (full Result-aware variant) - #2824 pm-e2e-bench unified workflow + phase-isolated bench infrastructure - #2858 mdx option, #2857 externalType: promise, #2829 sync next.js Resolution choices: - Cargo.toml: keep next's macOS-only aws-lc-rs gating (validated by #2856 to avoid Linux/x86_64 CI regression). Add crossbeam-queue for the worker-pool SegQueue. Keep rt-multi-thread test feature for worker-pool tests. - util/oncemap.rs + util/mod.rs: take next's superset (adds get_or_try_init, Debug impl, refined failure semantics). - service/* + model/manifest.rs + traits/registry.rs: keep PR's worker-pool API surface — its preload.rs depends on these shapes for the FuturesUnordered -> worker-pool migration. - Drop redundant `use utoo_ruborist::util::oncemap::OnceMap;` lines in pm/util/{cloner,downloader}.rs after import-path consolidation. cargo clippy --all-targets -- -D warnings clean for utoo-pm + utoo-ruborist cargo test passes: 245 pm + 167 ruborist + 10 doctests
Summary
Align with umi's: https://github.com/umijs/umi/blob/master/packages/bundler-webpack/src/config/javaScriptRules.ts#L200-L207
And mako's: https://makojs.dev/docs/config#mdx
Default is false, not enable.
Test Plan
add snapshot test case