Skip to content

feat(cli): support upstream Vite overrides in ecosystem CI - #3142

Draft
fengmk2 wants to merge 3 commits into
mainfrom
fix/upstream-vite-overrides
Draft

fengmk2 wants to merge 3 commits into
mainfrom
fix/upstream-vite-overrides

Conversation

@fengmk2

@fengmk2 fengmk2 commented Oct 20, 2026 •

Copy link
Copy Markdown
Member

A vite override breaks vp pack because upstream Vite has no vite/pack export. Pack now ships inside vite-plus, with its runtime and type declarations. The bundle includes tsdown and Rolldown. Release builds use the existing native platform packages.

Public Vite APIs, configuration loading, and Vite commands retain the existing vite alias. This change adds no direct @voidzero-dev/vite-plus-core dependency.

Set VP_USE_PROJECT_VITE=1 to permit upstream Vite for vp dev, vp build, and vp preview. The CLI and the project's declared vite dependency must resolve to the same package path. Partial overrides and separate copies of the same version fail this check. Commands always use the CLI's dependency, including its public bin entry for published and local file: packages. Without the setting, these commands retain the core name and version checks.

Apply the override to all vite dependencies so Vitest uses the same Vite package. vp test and vite-plus/test retain the same Vitest instance.

The diagram shows an ecosystem CI override to upstream Vite.

flowchart TB
  subgraph before["Before: upstream Vite override"]
    direction LR
    B_PACK["vp pack"] -->|"Missing vite/pack export"| B_VITE["vite<br/>Upstream Vite"]
    B_CLI["vp dev / build / preview"] -->|"Core check fails"| B_VITE
    B_API["Public Vite APIs + config + Vitest"] --> B_VITE
  end

  subgraph after["After: upstream Vite override"]
    direction LR
    A_PACK["vp pack"] --> A_BUNDLE["Pack + Rolldown<br/>Inside vite-plus"]
    A_PACK -->|"Configuration loading"| A_VITE["One upstream Vite package"]
    A_CLI["vp dev / build / preview"] -->|"VP_USE_PROJECT_VITE=1<br/>CLI vite dependency"| A_VITE
    A_PROJECT["Project vite dependency"] -->|"Must resolve to the same path"| A_VITE
    A_API["Public Vite APIs + Vitest"] --> A_VITE
  end

  before ~~~ after

  classDef blocked fill:#ffebe9,stroke:#cf222e,color:#82071e
  classDef bundled fill:#dafbe1,stroke:#1a7f37,color:#116329
  class B_PACK,B_CLI blocked
  class A_BUNDLE,A_VITE bundled
Loading

Closes #3135.

@github-actions

github-actions Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

✅ Staging deployment successful!

Preview: https://viteplus-staging.void.app/
Commit: 45c3c5e

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

🚀 Deploying Preview to Cloudflare 🚀

Preview URL: https://fix-upstream-vite-overrides-viteplus-dev.voidzero-docs.workers.dev (commit 45c3c5e)

This URL reflects your latest Preview deployment

Preview Deployments by commit

Status Deployment URL Commit Updated (UTC) See this deployment's details
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://7b51c874-viteplus-dev.voidzero-docs.workers.dev 45c3c5e 2026-10-20T17:06:49.388Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://0f40d983-viteplus-dev.voidzero-docs.workers.dev 32e822d 2026-10-20T15:24:55.947Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://8238a836-viteplus-dev.voidzero-docs.workers.dev 99309a3 2026-10-20T14:36:36.020Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://44847037-viteplus-dev.voidzero-docs.workers.dev 01e4dbe 2026-10-20T12:12:52.514Z Visit the dashboard ↗

@github-actions

github-actions Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

CLI artifact sizes (45c3c5e)

Final release artifacts built by the canonical build-upstream and build-windows-cli actions.
The dist rows use the Linux build. The core total excludes .node files to match the release artifact.

Artifact Format Base PR Change
packages/cli/dist Directory total 2.17 MiB 22.62 MiB +20.45 MiB (+943.83%)
packages/core/dist Directory total 4.08 MiB 4.08 MiB 0 B (0.00%)
Combined package dist Directory total 6.25 MiB 26.70 MiB +20.45 MiB (+327.18%)
vp (Linux x64) Binary 7.27 MiB 7.27 MiB 0 B (0.00%)
vp (Linux x64) gzip -9 3.37 MiB 3.37 MiB +525 B (+0.01%)
NAPI (Linux x64) Binary 35.14 MiB 35.14 MiB 0 B (0.00%)
NAPI (Linux x64) gzip -9 14.01 MiB 14.01 MiB +646 B (+0.00%)
vp (macOS ARM64) Binary 4.82 MiB 4.82 MiB 0 B (0.00%)
vp (macOS ARM64) gzip -9 2.88 MiB 2.88 MiB +406 B (+0.01%)
NAPI (macOS ARM64) Binary 42.01 MiB 42.01 MiB 0 B (0.00%)
NAPI (macOS ARM64) gzip -9 18.17 MiB 18.17 MiB +866 B (+0.00%)
vp (Windows x64) Binary 5.31 MiB 5.31 MiB +1.50 KiB (+0.03%)
vp (Windows x64) gzip -9 2.48 MiB 2.48 MiB +96 B (+0.00%)
NAPI (Windows x64) Binary 31.20 MiB 31.20 MiB 0 B (0.00%)
NAPI (Windows x64) gzip -9 12.72 MiB 12.72 MiB +335 B (+0.00%)
Trampoline (Windows x64) Binary 13.50 KiB 13.50 KiB 0 B (0.00%)
Trampoline (Windows x64) gzip -9 7.09 KiB 7.09 KiB 0 B (0.00%)
Installer (Windows x64) Binary 3.66 MiB 3.66 MiB 0 B (0.00%)
Installer (Windows x64) gzip -9 1.79 MiB 1.79 MiB -2 B (-0.00%)

@fengmk2 fengmk2 added test: e2e Auto run e2e tests test: install-e2e run vite install e2e test test: create-e2e Run `vp create` e2e tests labels Oct 20, 2026
@fengmk2
fengmk2 force-pushed the fix/upstream-vite-overrides branch from 32e822d to 45c3c5e Compare October 20, 2026 17:06

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test: create-e2e Run `vp create` e2e tests test: e2e Auto run e2e tests test: install-e2e run vite install e2e test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support upstream Vite overrides in ecosystem CI

1 participant