fix(cli): share Vite runtime through the core alias - #2617
Conversation
✅ Deploy Preview for viteplus-preview canceled.
|
🚀 Deploying Preview to Cloudflare 🚀Preview URL: https://fix-vite-core-module-identity-viteplus-dev.voidzero-docs.workers.dev (commit 025d9f1)This URL reflects your latest Preview deploymentPreview Deployments by commit
|
CLI artifact sizes (
|
| Artifact | Format | Base | PR | Change |
|---|---|---|---|---|
packages/cli/dist |
Directory total | 2.13 MiB | 2.13 MiB | +543 B (+0.02%) |
packages/core/dist |
Directory total | 3.92 MiB | 3.92 MiB | 0 B (0.00%) |
| Combined package dist | Directory total | 6.05 MiB | 6.06 MiB | +543 B (+0.01%) |
vp (Linux x64) |
Binary | 10.99 MiB | 10.99 MiB | 0 B (0.00%) |
vp (Linux x64) |
gzip -9 | 4.76 MiB | 4.76 MiB | 0 B (0.00%) |
| NAPI (Linux x64) | Binary | 31.88 MiB | 31.88 MiB | 0 B (0.00%) |
| NAPI (Linux x64) | gzip -9 | 12.58 MiB | 12.58 MiB | 0 B (0.00%) |
vp (macOS ARM64) |
Binary | 8.19 MiB | 8.19 MiB | 0 B (0.00%) |
vp (macOS ARM64) |
gzip -9 | 4.15 MiB | 4.15 MiB | 0 B (0.00%) |
| NAPI (macOS ARM64) | Binary | 39.50 MiB | 39.50 MiB | 0 B (0.00%) |
| NAPI (macOS ARM64) | gzip -9 | 16.91 MiB | 16.91 MiB | -1 B (-0.00%) |
vp (Windows x64) |
Binary | 8.86 MiB | 8.86 MiB | 0 B (0.00%) |
vp (Windows x64) |
gzip -9 | 3.88 MiB | 3.88 MiB | +1 B (+0.00%) |
| NAPI (Windows x64) | Binary | 26.76 MiB | 26.76 MiB | 0 B (0.00%) |
| NAPI (Windows x64) | gzip -9 | 10.68 MiB | 10.68 MiB | -24 B (-0.00%) |
| Trampoline (Windows x64) | Binary | 14.00 KiB | 14.00 KiB | 0 B (0.00%) |
| Trampoline (Windows x64) | gzip -9 | 7.09 KiB | 7.09 KiB | +1 B (+0.01%) |
| 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%) |
Registry bridge build (
|
| Package | Version |
|---|---|
vite-plus |
0.0.0-commit.38ca5e41725443a4a5df192af5d43ea4568c3e72 |
@voidzero-dev/vite-plus-core |
0.0.0-commit.38ca5e41725443a4a5df192af5d43ea4568c3e72 |
Install the Vite+ CLI built from this commit, then migrate a project:
# macOS / Linux
curl -fsSL https://raw.githubusercontent.com/voidzero-dev/vite-plus/38ca5e41725443a4a5df192af5d43ea4568c3e72/packages/cli/install.sh | VP_PR_VERSION=2617 bash# Windows (PowerShell)
$env:VP_PR_VERSION="2617"; irm https://raw.githubusercontent.com/voidzero-dev/vite-plus/38ca5e41725443a4a5df192af5d43ea4568c3e72/packages/cli/install.ps1 | iexOr 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.38ca5e41725443a4a5df192af5d43ea4568c3e72" --registry "https://registry-bridge.viteplus.dev/"After installing, upgrade the current project's vite-plus to this test build with:
vp migrateOr 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.38ca5e41725443a4a5df192af5d43ea4568c3e72",
"vite": "npm:@voidzero-dev/vite-plus-core@0.0.0-commit.38ca5e41725443a4a5df192af5d43ea4568c3e72"
}
}
🐳 Docker preview imageBuilt from this PR's registry bridge build:
# remove any stale local copy from a previous run, then pull fresh
docker rmi ghcr.io/voidzero-dev/vite-plus:pr-2617 2>/dev/null; docker pull ghcr.io/voidzero-dev/vite-plus:pr-2617Quick check: docker run --rm ghcr.io/voidzero-dev/vite-plus:pr-2617 vp --versionSee docs/guide/docker.md for usage. |
TanStack Start can return HTTP 404 when the CLI and plugins load separate core copies. The CLI now uses the exact
vitealias for its dependency, runtime imports, and generated exports. Version checks read the installed CLI manifest and report incompatible aliases before Vite or packaging commands start.Preview packing and CI tarball installation preserve the alias. Version checks also support packages whose versions change after the build. The design is in
rfcs/vite-core-module-identity.md.Fixes #1391.