Skip to content

fix(migrate): restore merging of unreferenced Oxc configs - #2695

Open
fengmk2 wants to merge 7 commits into
mainfrom
fix/migrate-preserve-referenced-oxc-config
Open

fengmk2 wants to merge 7 commits into
mainfrom
fix/migrate-preserve-referenced-oxc-config

Conversation

@fengmk2

@fengmk2 fengmk2 commented Sep 14, 2026

Copy link
Copy Markdown
Member

vp migrate can leave standalone Oxc configs after an interrupted migration installs Vite+. Restore the config merge step removed by #2696.

The command merges unreferenced configs into vite.config.ts. It preserves configs used by imports, package scripts, JSON extends chains, and existing inline settings. Retained configs keep their lint options.

Explicit --config and -c paths take precedence over inline settings for vp lint and vp fmt.

@cloudflare-workers-and-pages

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

Copy link
Copy Markdown

🚀 Deploying Preview to Cloudflare 🚀

Preview URL: https://fix-migrate-preserve-referenced-oxc-config-viteplus-dev.voidzero-docs.workers.dev (commit a8d39f2)

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://d7c32395-viteplus-dev.voidzero-docs.workers.dev a8d39f2 2026-09-14T14:43:16.670Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://dd1102a0-viteplus-dev.voidzero-docs.workers.dev 34e5e93 2026-09-14T10:02:17.810Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://7573c61f-viteplus-dev.voidzero-docs.workers.dev fe8a8ec 2026-09-14T09:34:24.181Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://a0159896-viteplus-dev.voidzero-docs.workers.dev 5fdab2f 2026-09-14T09:28:34.901Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://0ecd94cc-viteplus-dev.voidzero-docs.workers.dev 72e02ab 2026-09-14T07:57:44.452Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://370a13a3-viteplus-dev.voidzero-docs.workers.dev 632ee21 2026-09-14T07:20:01.448Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://b84a000f-viteplus-dev.voidzero-docs.workers.dev 7aba8cb 2026-09-14T07:11:04.071Z Visit the dashboard ↗

@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 Sep 14, 2026
fengmk2 added a commit that referenced this pull request Sep 14, 2026
Revert #2654. `vp migrate` again preserves standalone Oxc configs in
projects that already use Vite+.

The added merge step deletes configs that imports or package scripts
still use. It also copies JSON `extends` paths into incompatible inline
config. Ecosystem tests reproduced these failures in
[freecut](vite-plus-ecosystem-ci/freecut#9),
[delta-comic](vite-plus-ecosystem-ci/delta-comic#9),
[pdfme](vite-plus-ecosystem-ci/pdfme#7), and
[sigle](vite-plus-ecosystem-ci/sigle#8).

This revert restores an earlier limitation: interrupted migrations can
leave Oxc configs unmerged. #2695 tracks the follow-up fix.
@fengmk2 fengmk2 changed the title fix(migrate): preserve referenced Oxc configs fix(migrate): restore merging of unreferenced Oxc configs Sep 14, 2026
@github-actions

github-actions Bot commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

CLI artifact sizes (a8d39f2)

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.14 MiB 2.15 MiB +5.17 KiB (+0.24%)
packages/core/dist Directory total 3.94 MiB 3.94 MiB 0 B (0.00%)
Combined package dist Directory total 6.09 MiB 6.09 MiB +5.17 KiB (+0.08%)
vp (Linux x64) Binary 11.18 MiB 11.18 MiB 0 B (0.00%)
vp (Linux x64) gzip -9 4.84 MiB 4.84 MiB 0 B (0.00%)
NAPI (Linux x64) Binary 32.12 MiB 32.12 MiB 0 B (0.00%)
NAPI (Linux x64) gzip -9 12.71 MiB 12.71 MiB +5 B (+0.00%)
vp (macOS ARM64) Binary 8.33 MiB 8.33 MiB 0 B (0.00%)
vp (macOS ARM64) gzip -9 4.21 MiB 4.21 MiB 0 B (0.00%)
NAPI (macOS ARM64) Binary 39.68 MiB 39.68 MiB 0 B (0.00%)
NAPI (macOS ARM64) gzip -9 17.00 MiB 17.00 MiB +855 B (+0.00%)
vp (Windows x64) Binary 9.06 MiB 9.06 MiB 0 B (0.00%)
vp (Windows x64) gzip -9 3.95 MiB 3.95 MiB 0 B (0.00%)
NAPI (Windows x64) Binary 27.03 MiB 27.03 MiB 0 B (0.00%)
NAPI (Windows x64) gzip -9 10.80 MiB 10.80 MiB +445 B (+0.00%)
Trampoline (Windows x64) Binary 13.50 KiB 13.50 KiB 0 B (0.00%)
Trampoline (Windows x64) gzip -9 7.03 KiB 7.03 KiB -1 B (-0.01%)
Installer (Windows x64) Binary 4.53 MiB 4.53 MiB 0 B (0.00%)
Installer (Windows x64) gzip -9 2.12 MiB 2.12 MiB -1 B (-0.00%)

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

Copy link
Copy Markdown
Contributor

Registry bridge build (34e5e93)

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.34e5e931bb3d24a88fa1473c3119827ea6345bfd
@voidzero-dev/vite-plus-core 0.0.0-commit.34e5e931bb3d24a88fa1473c3119827ea6345bfd

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

# macOS / Linux
curl -fsSL https://raw.githubusercontent.com/voidzero-dev/vite-plus/34e5e931bb3d24a88fa1473c3119827ea6345bfd/packages/cli/install.sh | VP_PR_VERSION=2695 VP_LEGACY_INSTALLER_URL=https://raw.githubusercontent.com/voidzero-dev/vite-plus/34e5e931bb3d24a88fa1473c3119827ea6345bfd/packages/cli/install-legacy.sh bash
# Windows (PowerShell)
$env:VP_PR_VERSION="2695"; $env:VP_LEGACY_INSTALLER_URL="https://raw.githubusercontent.com/voidzero-dev/vite-plus/34e5e931bb3d24a88fa1473c3119827ea6345bfd/packages/cli/install-legacy.ps1"; irm https://raw.githubusercontent.com/voidzero-dev/vite-plus/34e5e931bb3d24a88fa1473c3119827ea6345bfd/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.34e5e931bb3d24a88fa1473c3119827ea6345bfd" --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.34e5e931bb3d24a88fa1473c3119827ea6345bfd",
    "vite": "npm:@voidzero-dev/vite-plus-core@0.0.0-commit.34e5e931bb3d24a88fa1473c3119827ea6345bfd"
  }
}

@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-2695 228MB
# remove any stale local copy from a previous run, then pull fresh
docker rmi ghcr.io/voidzero-dev/vite-plus:pr-2695 2>/dev/null; docker pull ghcr.io/voidzero-dev/vite-plus:pr-2695

Quick check:

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

See docs/guide/docker.md for usage.

@fengmk2 fengmk2 self-assigned this Sep 14, 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 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.

1 participant