feat(rolldown): add rule-based build scan with CI gating
メンテナーはふだん 2 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 32/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- typescript
調査の方向性
Start in @vitejs/devtools-rolldown by tracing how recorded @rolldown/debug sessions reach the existing panels and diagnostics/messages surfaces, then map which proposed checks have sufficient data. Review the existing CLI entry points and the bundleAnalyzerPlugin report flow for reusable reporting patterns. Done means checks support severity, ignore patterns, and thresholds; findings appear in the UI and static report; and the CLI prints a summary and exits non-zero for error-level findings.
索引モデルが issue の本文から書いたものです。
説明
Clear and concise description of the problem
DevTools for Rolldown already surfaces the data needed to investigate a build: duplicate packages, plugin hook costs, module and chunk graphs, assets, and session comparison. What it does not have is a way to encode what is wrong and enforce it. Every review is manual — open the UI, check the Packages → Duplicated tab, scan plugin timings, compare sessions — and nothing can fail CI.
Rsdoctor has this as a dedicated layer over compiler data ("build scan"): rules with severity and ignore/threshold config, built-in checks (duplicate packages, cross-chunk packages, loader/plugin time thresholds, ECMA target, default imports, mixed initial/async modules, side-effects-only tree shaking, CJS require, ESM resolved to CJS), custom rules, and findings in both the CLI and the report: https://rsdoctor.rs/guide/rules/rules.md
Today the equivalent information exists in the DevTools panels, but it is only consumable by a human looking at it.
Suggested solution
Add a checks layer to @vitejs/devtools-rolldown, evaluated over the recorded @rolldown/debug session data:
- Built-in checks for the classes above where the data exists: duplicate package versions, cross-chunk duplicates, plugin hook time budgets, modules present in both initial and async chunks, etc.
- A
checksconfig withoff | warn | error, ignore patterns and thresholds, in the shape users already know from linter configs. - Findings in the DevTools UI and the static report, reusing the existing diagnostics/messages surfaces.
vite-devtools check(or a flag onvite-devtools build) that prints a summary and exits non-zero when error-level findings exist, so CI can gate on it.
The session data is already recorded for the existing panels, so the checks can be pure functions over a session. bundleAnalyzerPlugin's JSON could feed the same checks for non-Vite users later.
Alternative
Expose a stable read API for recorded build sessions and let a community plugin implement the rules. A rule engine outside core would still need a CLI entry point to be usable in CI.
Additional context
- Rsdoctor built-in rules: https://rsdoctor.rs/guide/rules/rules.md
- Related: #601 / #615 add module-level session compare, #611 adds agent access. Once the agent surface lands, the same findings could be exposed through it.
- For reference,
bundleAnalyzerPluginalready emits an LLM-oriented Markdown report (https://github.com/rolldown/rolldown/blob/main/docs/builtin-plugins/bundle-analyzer.md), but it reports facts, not pass/fail checks.
Validations
- Follow our Code of Conduct
- Read the Contributing Guide.
- Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
- 主要言語
- TypeScript
- スター
- 1.2k
- フォーク
- 97
- 平均マージ
- 2日 19時間
- マージ済み PR(30日)
- 14
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
vitejs/devtools のほかの issue
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
vitejs/devtools#261 · コメント 2 件 ·
メンテナーはふだん 2 日以内に返信
-
pending triage
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
メンテナーはふだん 2 日以内に返信
-
enhancement
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
メンテナーはふだん 2 日以内に返信
-
feat(oxc): add rule timing stats to the lint inspector再び着手できるかも @yuyinws が 69 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンenhancement
vitejs/devtools#584 · 担当者 1 名 ·
メンテナーはふだん 2 日以内に返信
-
Static build: frame/panel URLs are still absolute when output is hosted at a subpath対応中かも @0froq が 11 日前に担当しました。 オープンpending triage
難易度 3/5 1〜2日 初心者へのやさしさ 58/100
vitejs/devtools#583 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
vitejs/devtools の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
knaw-huc/textannoviz#742 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
cloudflare/realtimekit-ui#219 ·
メンテナーはふだん 1 日以内に返信
-
ui
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
tui: Mermaid renderer displays <b>/<strong> tags literally and ignores \n line breaks対応中かも @argszero が今日担当しました。 オープンarea/tui platform/wsl status/repro-simulated type/bug version/v2
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
anomalyco/opencode#66773 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
mermaid-js/mermaid-v13#1370 ·
メンテナーはふだん 1 日以内に返信