fix(cli): traverse parent directories to find vite.config.ts in vp pack#1072
fix(cli): traverse parent directories to find vite.config.ts in vp pack#1072fengmk2 merged 10 commits intovoidzero-dev:mainfrom
Conversation
✅ Deploy Preview for viteplus-preview canceled.
|
|
@codex review |
|
Codex Review: Didn't find any major issues. More of your lovely PRs please. ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
What about other commands? Does the build need to consider similar logic? |
|
Good point! I investigated how each command resolves vite config:
Since vite+ is the unified toolchain and users interact through For |
|
One thing I noticed during this investigation, the vite config resolution layer is currently split across JS and Rust:
The Rust side handles config resolution for Since vite+ unifies tool configuration through The solution to this root cause goes well beyond the scope of this issue. |
There was a problem hiding this comment.
💡 Codex Review
vite-plus/packages/cli/src/pack-bin.ts
Lines 139 to 142 in ec46391
If the newly discovered workspace-root vite.config.* contains pack: [...], this code will execute every entry even when vp pack is launched from a single package directory. There is no cwd-based narrowing before iterating viteConfig.pack, so a monorepo script like vp run foo#build can unexpectedly build sibling packages unless the user manually adds -F; that defeats the point of making package-local invocations reuse the parent config.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
As I understand it, tasks are cached by |
|
To use Codex here, create an environment for this repo. |
|
I reconsidered the behavior of
For I'll keep |
|
snap tests result change after vite-task update. I will fix it before merge. |
Cache hit is not working for pack monorepo builds currently because the build modifies its own input. Update the test to capture full output instead of grepping for cache hit.
follow up here #1095 |
resolve #942