voidzero-dev / voidzero-dev/vite-plus

Print hint when config load exceeds 500ms

オープン
#1,231 コメント 1 件 リアクション 0 件 担当者 1 名 @fengmk2 が担当を希望しています GitHub で見る
主要言語
Rust
スター
5.8k
フォーク
262
平均マージ
23時間 18分
マージ済み PR(30日)
139

説明

## Summary
When `vp` spends more than ~500ms loading the local config we should close the run with a gentle hint so folks know where to look for tuning guidance.

## Motivation
Slow config discovery/merging usually means project-specific overrides or expensive plugin setup. Surfacing a pointer to the config docs right after the command finishes gives people a next step instead of silently eating the latency.

## Proposal
- Measure config load duration for every `vp` command that loads the project config.
- If it exceeds 500ms, append a one-line hint at the very end of the command output (after existing summaries) such as:
```
hint: config took 640ms to load – see https://viteplus.dev/config/ for cleanup tips
```
- Ensure:
- Only prints once per run
- Respects `--json` / `--silent` modes (do not emit in structured output scenarios)
- Uses the actual measured duration in the message

## Acceptance Criteria
- Commands that trigger slow config loads (>500ms) show the hint exactly once at the end.
- Fast runs (<500ms) show no extra output.
- Link points to https://viteplus.dev/config/.
- Covered by a test (unit or integration) that exercises both the <500ms and >500ms paths.

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。