Skip to content

Migrate to Vite+ (vp) unified toolchain - #68

Open
kwiersma wants to merge 7 commits into
masterfrom
claude/friendly-leavitt
Open

Migrate to Vite+ (vp) unified toolchain#68
kwiersma wants to merge 7 commits into
masterfrom
claude/friendly-leavitt

Conversation

@kwiersma

Copy link
Copy Markdown
Owner

Summary

  • Replaces standalone Vite 7, Vitest, ESLint (9 plugins), and Prettier with Vite+ — VoidZero's unified vp toolchain bundling Vite 8, Rolldown, Vitest, Oxlint, and Oxfmt
  • Drops ~15 devDependencies; lint is now 50–100× faster via Oxlint (Rust-based)
  • All npm scripts updated to vp equivalents; CI workflow switches to voidzero-dev/setup-vp@v1

What changed

Area Before After
Build/bundler Vite 7 + Rollup Vite+ 0.1.16 (Vite 8 + Rolldown)
Linter ESLint 9 + 9 plugins + flat config Oxlint via vp lint
Formatter Prettier + eslint-plugin-prettier Oxfmt via vp fmt
Test runner Vitest 4 (standalone) Vitest via Vite+
CI setup actions/setup-node + npm ci voidzero-dev/setup-vp@v1
Lint/fmt config eslint.config.js + .prettierrc.cjs Inline in vite.config.ts (lint/fmt sections)

Dropped rules (no Oxlint equivalents)

  • import-x/order — alphabetical import ordering
  • import-x/no-cycle — circular dependency detection

Reviewer notes

  • Rolldown null guard: assetFileNames in vite.config.ts now guards against assetInfo.name being undefined — Rolldown passes undefined for internally generated CSS assets, unlike Rollup. Build output structure (static/js/, static/css/) is unchanged.
  • @vitejs/plugin-react stays at 5.x: v6 imports vite/internal, a subpath not yet exported by @voidzero-dev/vite-plus-core. Will upgrade once Vite+ exposes it.
  • Alpha caveat: vite-plus is at v0.1.16 (alpha). Pinned to latest for now; consider pinning to a specific version before a production release.
  • All 46 tests pass, vp check is clean, vp build produces correct output.

🤖 Generated with Claude Code

kwiersma and others added 7 commits April 14, 2026 21:11
Replaces the standalone Vite 7, Vitest, ESLint (9 plugins), and Prettier
setup with vite-plus — VoidZero's unified toolchain that bundles Vite 8,
Rolldown, Vitest, Oxlint (50–100x faster than ESLint), and Oxfmt under a
single `vp` CLI.

Changes:
- Install vite-plus; add npm overrides for vite/vitest to vite-plus core packages
- Remove eslint, prettier, and all associated plugins/configs (~15 packages)
- Delete eslint.config.js and .prettierrc.cjs; inline lint/fmt config in vite.config.ts
- Update all npm scripts to use vp (dev, build, test, lint, fmt, check)
- Switch CI workflow to voidzero-dev/setup-vp@v1 action (handles node + install + cache)
- Fix Rolldown assetFileNames null guard (assetInfo.name can be undefined in Rolldown)
- Keep @vitejs/plugin-react at 5.x (v6 imports vite/internal not yet exported by vite-plus)
- Update CLAUDE.md and README to reflect new toolchain

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
CI was picking up a newer vite-plus via `latest`, which shipped an updated
Oxfmt with different formatting opinions than the local install. Pin the
exact version in package.json overrides and setup-vp so local and CI use
identical tooling.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
setup-vp's default run-install runs `npm install`, which rewrites
package.json formatting before `vp check` runs, causing it to fail.
Switching to run-install: false + explicit `npm ci` avoids the rewrite
since npm ci only reads the lockfile and never modifies package.json.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
setup-vp installs Node.js via `vp env use`, which runs a different npm
version than local. That npm rewrites package.json with its own formatting
before `vp check` runs. Since npm owns package.json's format, excluding it
(and package-lock.json) from Oxfmt is the correct boundary.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The fmt.ignore config key is not a valid Oxfmt option and was silently
ignored. Oxfmt reads .prettierignore (and .gitignore) for file exclusions.
Adding package.json and package-lock.json there is the correct mechanism.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
claude-code-action validates that the workflow file matches the default
branch exactly as a security measure. Oxfmt had stripped a trailing
newline, causing a content mismatch and 401 on every PR run.

Restoring to match master and adding to .prettierignore so Oxfmt
can never touch it again.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant