Skip to content

fix(cli): share Vite runtime through the core alias - #2617

Open
fengmk2 wants to merge 4 commits into
mainfrom
fix/vite-core-module-identity
Open

fix(cli): share Vite runtime through the core alias#2617
fengmk2 wants to merge 4 commits into
mainfrom
fix/vite-core-module-identity

Conversation

@fengmk2

@fengmk2 fengmk2 commented Sep 6, 2026

Copy link
Copy Markdown
Member

TanStack Start can return HTTP 404 when the CLI and plugins load separate core copies. The CLI now uses the exact vite alias 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.

@netlify

netlify Bot commented Sep 6, 2026

Copy link
Copy Markdown

Deploy Preview for viteplus-preview canceled.

Name Link
🔨 Latest commit 025d9f1
🔍 Latest deploy log https://app.netlify.com/projects/viteplus-preview/deploys/6a9d8dc3d5c02b000876b967

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Sep 6, 2026

Copy link
Copy Markdown

🚀 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 deployment

Preview Deployments by commit

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

View logs ↗
https://d349dea2-viteplus-dev.voidzero-docs.workers.dev 025d9f1 2026-09-06T16:00:41.305Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://b4724b1d-viteplus-dev.voidzero-docs.workers.dev b1c17ad 2026-09-06T15:45:46.225Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://486ca84f-viteplus-dev.voidzero-docs.workers.dev 38ca5e4 2026-09-06T15:13:59.763Z Visit the dashboard ↗

@fengmk2 fengmk2 self-assigned this Sep 6, 2026
@fengmk2 fengmk2 added the preview-build Publish this PR's commits to the registry bridge as preview builds label Sep 6, 2026
@github-actions

github-actions Bot commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

CLI artifact sizes (025d9f1)

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.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%)

@github-actions

github-actions Bot commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Registry bridge build (38ca5e4)

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.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 | 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.38ca5e41725443a4a5df192af5d43ea4568c3e72" --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.38ca5e41725443a4a5df192af5d43ea4568c3e72",
    "vite": "npm:@voidzero-dev/vite-plus-core@0.0.0-commit.38ca5e41725443a4a5df192af5d43ea4568c3e72"
  }
}

@github-actions

github-actions Bot commented Sep 6, 2026

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-2617 222MB
# 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-2617

Quick check:

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

See docs/guide/docker.md for usage.

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.

TanStack Start SSR broken: dual-copy of vite-plus-core causes isRunnableDevEnvironment() instanceof failure

1 participant