Skip to content

Proposal: Replace local rolldown/vite clones with git/npm dependencies #1388

@Han5991

Description

@Han5991

Description

Currently, setting up the vite-plus development environment requires cloning the entire rolldown and vite repositories locally via just init (sync-remote-deps.ts). This process:

  • Clones full rolldown/vite source trees into the workspace
  • Merges their pnpm catalog entries, workspace packages, and package exports
  • Applies branding patches (5 string replacements: "Vite" → "Vite+", CLI name, colors, prefixes)
  • Requires maintaining brand-vite.ts, sync-remote-deps.ts, .upstream-versions.json, and related build scripts

This adds significant infrastructure complexity for what is essentially a thin branding layer on top of upstream packages.

I've verified that both Rust and Node.js dependencies can be consumed directly without local clones:

  • Rust: rolldown crates work as git dependencies (git = "https://github.com/rolldown/rolldown.git", rev = "...") — full cargo check and cargo test pass (1,222 tests)
  • Node.js: rolldown and vite work as npm dependencies (rolldown: 1.0.0-rc.15, vite: 8.0.8 via pnpm catalog) — pnpm install and snap tests all pass

I'd like to submit a PR for this change.

Suggested solution

  1. Rust crates: Replace path = "./rolldown/crates/..." dependencies in Cargo.toml with git = "https://github.com/rolldown/rolldown.git", rev = "" for all ~50 rolldown crates.

  2. Node.js packages: Replace workspace:* references to rolldown/vite with npm versions managed via pnpm catalog in pnpm-workspace.yaml (e.g., rolldown: 1.0.0-rc.15, vite: 8.0.8).

  3. Branding: Apply branding patches as post-processing on installed dist files, similar to how vitest branding is already handled in this project.

  4. Remove: sync-remote-deps.ts, brand-vite.ts, .upstream-versions.json, and related workspace merge logic in justfile.

Alternative

  • Keep the current clone-based approach but document the rationale more clearly if there are reasons beyond branding patches that require full source checkouts.
  • Use a lighter patching mechanism (e.g., pnpm patchedDependencies) for branding instead of full source clones.

Additional context

  • Verified on branch refactor/rolldown-git-dependency based on latest main
  • oxc crates need to be bumped to 0.124.0 to match rolldown's requirements (from 0.123.0)
  • The vitest package in this project already uses the "install from npm + post-process dist" pattern for branding, so there is precedent within the codebase
  • 7 files changed in total for the full conversion

Validations

  • Read the Contributing Guidelines.
  • Confirm this request is for Vite+ itself and not for Vite, Vitest, tsdown, Rolldown, or Oxc.
  • Check that there isn't already an issue requesting the same feature.

Metadata

Metadata

Assignees

No one assigned

    Priority

    None yet

    Start date

    None yet

    Target date

    None yet

    Effort

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions