Skip to content

feat: add vite-plus support - #7128

Merged
serhalp merged 5 commits into
mainfrom
serhalp/feat/vite-plus-build-system
Jul 23, 2026
Merged

feat: add vite-plus support#7128
serhalp merged 5 commits into
mainfrom
serhalp/feat/vite-plus-build-system

Conversation

@serhalp

@serhalp serhalp commented Jul 15, 2026

Copy link
Copy Markdown
Member

Summary

https://viteplus.dev doesn't quite fit into the boxes we currently use in this package, since it's a sort of package manager wrapper, a monorepo/build tool, and it even has vp build and vp dev.

But I believe I've found a reasonable way to get this all working without any hacks. By just registering it as a new "build system" and extending the vite "framework" with a bit of vite-plus knowledge:

  • It's detected. We need this to show a pretty logo, capture usage in telemetry, and to run vp install automatically in our build system.
  • The monorepo tooling should just work. This is used by Netlify CLI's netlify dev --filter foo to construct the right underlying vp command.
  • When vite-plus is installed (but no vite-based metaframework), we'll default to vp build and vp dev instead of vite build and vite dev.

Closes #7013

https://viteplus.dev doesn't quite fit into the boxes we currently use in this package, since it's
a sort of package manager wrapper, a monorepo/build tool, and it even has `vp build` and `vp dev`.

But it seems we can get most of this working by just registering it as a "build system":
- It's detected. We need this to show a pretty logo, capture usage in telemetry, and to run `vp
  install` automatically in our build system.
- The monorepo tooling should just work. This is used by Netlify CLI's `netlify dev --filter foo` to
  construct the right underlying `vp` command.
@coderabbitai

coderabbitai Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: a808f32b-cd08-4c25-9e71-baf74941b049

📥 Commits

Reviewing files that changed from the base of the PR and between cab2eba and 5d35ac7.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (1)
  • packages/build-info/package.json
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • netlify/blueprints (manual)
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/build-info/package.json

📝 Walkthrough

Summary by CodeRabbit

  • New Features
    • Added support for detecting Vite Plus projects.
    • Vite projects using Vite Plus now use vp dev and vp build.
    • When available, the detected Vite Plus version can be derived from npm, pnpm, or Yarn lockfiles.
  • Bug Fixes
    • Improved Vite Plus detection for monorepos and nested lockfile scenarios.
  • Tests
    • Added Vitest coverage for Vite and Vite Plus detection, precedence, and command generation (including workspace behavior).

Walkthrough

Adds Vite Plus as a supported build system with dependency detection, exact version resolution from npm, pnpm, and Yarn lockfiles, workspace command generation, and fallback handling. Registers the new build system and adds tests for detection and commands. Extends Vite framework detection to use vp dev and vp build when Vite Plus is present, with tests for precedence and framework exclusions.

Estimated code review effort: 3 (Moderate) | ~25 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main change: adding Vite+ support.
Description check ✅ Passed The description includes the summary, motivation, and issue reference, though it omits the full template checklist.
Linked Issues check ✅ Passed The PR adds Vite+ build-system support and related framework behavior, matching issue #7013's request.
Out of Scope Changes check ✅ Passed The additional framework and test changes are directly related to Vite+ support and are not out of scope.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch serhalp/feat/vite-plus-build-system

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 Checkov (3.3.8)
packages/build-info/package.json

Traceback (most recent call last):
File "/usr/local/bin/checkov", line 2, in
from checkov.main import Checkov
ModuleNotFoundError: No module named 'checkov'


Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown
Contributor

e18e dependency analysis

No dependency warnings found.

@serhalp
serhalp marked this pull request as ready for review July 15, 2026 14:41
@serhalp
serhalp requested a review from a team as a code owner July 15, 2026 14:41

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@packages/build-info/src/build-systems/vite-plus.ts`:
- Around line 56-95: Update detect() and resolveLockedVersion() so lockfile
discovery starts from the directory containing the package.json that declared
vite-plus, rather than always from project.baseDirectory. Pass the declaring
manifest path or its directory from detect() into resolveLockedVersion(), and
use it as the findUp() cwd while preserving the existing root boundary and
version fallback behavior.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 8cbda9f2-0580-498f-bc24-7cd408fa71ce

📥 Commits

Reviewing files that changed from the base of the PR and between 46836e0 and e6f1c75.

⛔ Files ignored due to path filters (3)
  • package-lock.json is excluded by !**/package-lock.json
  • packages/build-info/assets/logos/vite-plus/icon-color-dark.svg is excluded by !**/*.svg
  • packages/build-info/assets/logos/vite-plus/icon-color-light.svg is excluded by !**/*.svg
📒 Files selected for processing (6)
  • packages/build-info/package.json
  • packages/build-info/src/build-systems/index.ts
  • packages/build-info/src/build-systems/vite-plus.test.ts
  • packages/build-info/src/build-systems/vite-plus.ts
  • packages/build-info/src/frameworks/vite.test.ts
  • packages/build-info/src/frameworks/vite.ts
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • netlify/blueprints (manual)

Comment thread packages/build-info/src/build-systems/vite-plus.ts
pieh
pieh previously approved these changes Jul 16, 2026
@pkg-pr-new

pkg-pr-new Bot commented Jul 17, 2026

Copy link
Copy Markdown

Open in StackBlitz

@netlify/build

npm i https://pkg.pr.new/@netlify/build@7128

@netlify/build-info

npm i https://pkg.pr.new/@netlify/build-info@7128

@netlify/cache-utils

npm i https://pkg.pr.new/@netlify/cache-utils@7128

@netlify/config

npm i https://pkg.pr.new/@netlify/config@7128

@netlify/edge-bundler

npm i https://pkg.pr.new/@netlify/edge-bundler@7128

@netlify/functions-utils

npm i https://pkg.pr.new/@netlify/functions-utils@7128

@netlify/git-utils

npm i https://pkg.pr.new/@netlify/git-utils@7128

@netlify/headers-parser

npm i https://pkg.pr.new/@netlify/headers-parser@7128

@netlify/api

npm i https://pkg.pr.new/@netlify/api@7128

@netlify/nock-udp

npm i https://pkg.pr.new/@netlify/nock-udp@7128

@netlify/opentelemetry-sdk-setup

npm i https://pkg.pr.new/@netlify/opentelemetry-sdk-setup@7128

@netlify/opentelemetry-utils

npm i https://pkg.pr.new/@netlify/opentelemetry-utils@7128

@netlify/redirect-parser

npm i https://pkg.pr.new/@netlify/redirect-parser@7128

@netlify/run-utils

npm i https://pkg.pr.new/@netlify/run-utils@7128

@netlify/zip-it-and-ship-it

npm i https://pkg.pr.new/@netlify/zip-it-and-ship-it@7128

commit: 5d35ac7

@serhalp
serhalp enabled auto-merge (squash) July 22, 2026 19:24
@serhalp
serhalp requested a review from pieh July 22, 2026 21:22
@serhalp
serhalp merged commit 2c86c0c into main Jul 23, 2026
61 of 63 checks passed
@serhalp
serhalp deleted the serhalp/feat/vite-plus-build-system branch July 23, 2026 06:52
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.

Vite+ Global CLI Support

2 participants