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
-
Rust crates: Replace path = "./rolldown/crates/..." dependencies in Cargo.toml with git = "https://github.com/rolldown/rolldown.git", rev = "" for all ~50 rolldown crates.
-
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).
-
Branding: Apply branding patches as post-processing on installed dist files, similar to how vitest branding is already handled in this project.
-
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
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:brand-vite.ts,sync-remote-deps.ts,.upstream-versions.json, and related build scriptsThis 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:
git = "https://github.com/rolldown/rolldown.git", rev = "...") — fullcargo checkandcargo testpass (1,222 tests)rolldown: 1.0.0-rc.15,vite: 8.0.8via pnpm catalog) —pnpm installand snap tests all passI'd like to submit a PR for this change.
Suggested solution
Rust crates: Replace path = "./rolldown/crates/..." dependencies in Cargo.toml with git = "https://github.com/rolldown/rolldown.git", rev = "" for all ~50 rolldown crates.
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).
Branding: Apply branding patches as post-processing on installed dist files, similar to how vitest branding is already handled in this project.
Remove: sync-remote-deps.ts, brand-vite.ts, .upstream-versions.json, and related workspace merge logic in justfile.
Alternative
patchedDependencies) for branding instead of full source clones.Additional context
refactor/rolldown-git-dependencybased on latestmainValidations