Skip to content

fix(cli): improve workspace app target classification - #2530

Open
fengmk2 wants to merge 10 commits into
mainfrom
fix/issue-2516
Open

fix(cli): improve workspace app target classification#2530
fengmk2 wants to merge 10 commits into
mainfrom
fix/issue-2516

Conversation

@fengmk2

@fengmk2 fengmk2 commented Aug 22, 2026

Copy link
Copy Markdown
Member

Vite+ now uses one signal set when it selects a workspace-root app for vp dev, vp build, and vp preview. Any declared root, build, input, environments, or appType field selects the root. A source index.html also selects it. Vite+ does not inspect declared values. dist/index.html is not a signal.

When no root signal exists, the picker and non-interactive list show the workspace root as .. This row comes after all member rows. It does not affect automatic selection of one runnable member. vp -C . <command> selects the root directly.

Local and global snapshots cover vp dev, vp build, and vp preview. Unit tests confirm that all three commands use the same fields and source HTML signal. Other snapshots cover the root fallback, explicit -C, SSR input, and pack --root.

The RFC describes these rules.

Fixes #2516.

@netlify

netlify Bot commented Aug 22, 2026

Copy link
Copy Markdown

Deploy Preview for viteplus-preview canceled.

Name Link
🔨 Latest commit 3d0ffc3
🔍 Latest deploy log https://app.netlify.com/projects/viteplus-preview/deploys/6a89c353304b640008906f07

@fengmk2 fengmk2 self-assigned this Aug 22, 2026
@fengmk2
fengmk2 requested a review from Brooooooklyn August 22, 2026 05:06
@fengmk2 fengmk2 added the preview-build Publish this PR's commits to the registry bridge as preview builds label Aug 22, 2026
@fengmk2 fengmk2 added preview-build Publish this PR's commits to the registry bridge as preview builds and removed preview-build Publish this PR's commits to the registry bridge as preview builds labels Aug 22, 2026
@github-actions

github-actions Bot commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

Native binary sizes (6b02f27)

Final release artifacts built by the canonical build-upstream and build-windows-cli actions.

Artifact Format Base PR Change
vp (Linux x64) Binary 10.73 MiB 10.74 MiB +4.00 KiB (+0.04%)
vp (Linux x64) gzip -9 4.64 MiB 4.65 MiB +867 B (+0.02%)
NAPI (Linux x64) Binary 32.20 MiB 32.21 MiB +4.00 KiB (+0.01%)
NAPI (Linux x64) gzip -9 12.69 MiB 12.69 MiB +1.75 KiB (+0.01%)
vp (macOS ARM64) Binary 8.03 MiB 8.03 MiB 0 B (0.00%)
vp (macOS ARM64) gzip -9 4.05 MiB 4.05 MiB +2.53 KiB (+0.06%)
NAPI (macOS ARM64) Binary 39.80 MiB 39.80 MiB +16 B (+0.00%)
NAPI (macOS ARM64) gzip -9 16.98 MiB 16.99 MiB +5.96 KiB (+0.03%)
vp (Windows x64) Binary 8.63 MiB 8.63 MiB +3.00 KiB (+0.03%)
vp (Windows x64) gzip -9 3.77 MiB 3.77 MiB +1.12 KiB (+0.03%)
NAPI (Windows x64) Binary 27.03 MiB 27.04 MiB +3.50 KiB (+0.01%)
NAPI (Windows x64) gzip -9 10.75 MiB 10.76 MiB +2.58 KiB (+0.02%)
Trampoline (Windows x64) Binary 214.00 KiB 214.00 KiB 0 B (0.00%)
Trampoline (Windows x64) gzip -9 103.20 KiB 103.20 KiB 0 B (0.00%)
Installer (Windows x64) Binary 4.50 MiB 4.50 MiB 0 B (0.00%)
Installer (Windows x64) gzip -9 2.11 MiB 2.11 MiB 0 B (0.00%)

@github-actions

github-actions Bot commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

Registry bridge build (b011f8f)

This commit build is published to the registry bridge, which serves these as ordinary npm versions (every other package proxies to npmjs):

Package Version
vite-plus 0.0.0-commit.b011f8f2492b551faa08b86bca3aa224cd581cf6
@voidzero-dev/vite-plus-core 0.0.0-commit.b011f8f2492b551faa08b86bca3aa224cd581cf6

Install the Vite+ CLI built from this commit, then migrate a project:

# macOS / Linux
curl -fsSL https://raw.githubusercontent.com/voidzero-dev/vite-plus/b011f8f2492b551faa08b86bca3aa224cd581cf6/packages/cli/install.sh | VP_PR_VERSION=2530 bash
# Windows (PowerShell)
$env:VP_PR_VERSION="2530"; irm https://raw.githubusercontent.com/voidzero-dev/vite-plus/b011f8f2492b551faa08b86bca3aa224cd581cf6/packages/cli/install.ps1 | iex

Or download the standalone Windows installer built from this commit:

Architecture Installer
x64 vp-setup-x86_64-pc-windows-msvc.exe
Arm64 vp-setup-aarch64-pc-windows-msvc.exe

GitHub requires you to sign in and downloads each installer as a ZIP artifact. Extract vp-setup.exe, then run it against this preview build:

.\vp-setup.exe --version "0.0.0-commit.b011f8f2492b551faa08b86bca3aa224cd581cf6" --registry "https://registry-bridge.viteplus.dev/"

After installing, upgrade the current project's vite-plus to this test build with:

vp migrate

Or point your package manager at the bridge registry https://registry-bridge.viteplus.dev/:

Package manager Registry config
npm / pnpm / Bun .npmrc: registry=https://registry-bridge.viteplus.dev/
Yarn (v2+) .yarnrc.yml: npmRegistryServer: "https://registry-bridge.viteplus.dev/"

Then pin the build (vite aliases to vite-plus-core; pnpm can use a catalog, npm an overrides entry):

{
  "devDependencies": {
    "vite-plus": "0.0.0-commit.b011f8f2492b551faa08b86bca3aa224cd581cf6",
    "vite": "npm:@voidzero-dev/vite-plus-core@0.0.0-commit.b011f8f2492b551faa08b86bca3aa224cd581cf6"
  }
}

@github-actions

Copy link
Copy Markdown
Contributor

🐳 Docker preview image

Built from this PR's registry bridge build:

Image Compressed size
ghcr.io/voidzero-dev/vite-plus:pr-2530 236MB
# remove any stale local copy from a previous run, then pull fresh
docker rmi ghcr.io/voidzero-dev/vite-plus:pr-2530 2>/dev/null; docker pull ghcr.io/voidzero-dev/vite-plus:pr-2530

Quick check:

docker run --rm ghcr.io/voidzero-dev/vite-plus:pr-2530 vp --version

See docs/guide/docker.md for usage.

@fengmk2 fengmk2 added preview-build Publish this PR's commits to the registry bridge as preview builds and removed preview-build Publish this PR's commits to the registry bridge as preview builds labels Aug 22, 2026
@fengmk2 fengmk2 added preview-build Publish this PR's commits to the registry bridge as preview builds and removed preview-build Publish this PR's commits to the registry bridge as preview builds labels Aug 22, 2026
@fengmk2 fengmk2 changed the title fix(cli): respect custom Vite root for app targets fix(cli): use custom Vite root for app targets Aug 22, 2026
@fengmk2 fengmk2 added preview-build Publish this PR's commits to the registry bridge as preview builds and removed preview-build Publish this PR's commits to the registry bridge as preview builds labels Aug 22, 2026
@fengmk2 fengmk2 changed the title fix(cli): use custom Vite root for app targets fix(cli): improve workspace app target classification Aug 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

preview-build Publish this PR's commits to the registry bridge as preview builds

Projects

None yet

Development

Successfully merging this pull request may close these issues.

vite+ refuses to run dev server in root package of monorepo if index.html is not in root

2 participants