Skip to content

--project filter is applied after inline workspace project initialization #1122

@edison1105

Description

@edison1105

Describe the bug

vp test --project is expected to run only the matching workspace project, but inline workspace projects are still initialized before the project filter is applied.

Reproduction

https://github.com/edison1105/vite-plus-project-filter-repro

Steps to reproduce

clone https://github.com/edison1105/vite-plus-project-filter-repro

Install

vp install

Repro

vp test --project unit

Expected

Only the unit project is initialized, and unit.spec.ts passes.

Actual

vite-plus still initializes the filtered-out broken project, loads broken.config.ts, and throws before the unit project can run.

Additional

While working on vuejs/core#14618, I found that vp test --project does not filter inline workspace projects early enough. Filtered-out inline projects are still initialized before the project filter is applied.

System Info

Environment:
  Version       24.14.0
  Source        .node-version
  Source Path   /Users/edison/Desktop/Learning/demos/.node-version
  Project Root  /Users/edison/Desktop/Learning/demos

Tool Paths:
  node  /Users/edison/.vite-plus/js_runtime/node/24.14.0/bin/node
  npm   /Users/edison/.vite-plus/js_runtime/node/24.14.0/bin/npm
  npx   /Users/edison/.vite-plus/js_runtime/node/24.14.0/bin/npx

Used Package Manager

pnpm

Logs

Validations

Metadata

Metadata

Type

Priority

None yet

Effort

None yet

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions