GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat: support `rebuild` command · Issue #1057 · voidzero-dev/vite-plus

feat: support rebuild command #1057

New issue
Copy link
New issue
Copy link
Closed
Feature
#1383
Closed
feat: support rebuild command#1057
Feature
#1383
Copy link
Assignees
fengmk2

Description

@TheAlexLichter
TheAlexLichter
opened on Mar 19, 2026
Issue body actions

Description

Especially when using native deps that need to be built against against the current Node version, npm rebuild is necessary. Unfortunately, vp doesn't support that yet.

Suggested solution

vp rebuild as built-in command.

Alternative

No response

Additional context

No response

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.

Activity

  1. TheAlexLichter
    added the
    Feature
    issue type on Mar 19, 2026
  2. fengmk2
    assigned
    Boshen
    on Mar 20, 2026
  3. claude commented on Mar 20, 2026

    @claude
    claudeBot
    on Mar 20, 2026 – with Claude
    More actions

    Analysis

    Understanding the issue: The request is for a top-level vp rebuild command as a convenience shortcut for npm rebuild / pnpm rebuild, which is needed for rebuilding native Node.js addons against the current Node version.

    Current state: vp pm rebuild (with alias vp pm rb) already exists and is fully implemented in crates/vite_install/src/commands/rebuild.rs. It supports npm, pnpm, and warns gracefully for yarn v1 (which doesn't support rebuild). The underlying RebuildCommandOptions and run_rebuild_command are complete.

    Relevant files:

    • crates/vite_global_cli/src/main.rs — normalize_args() function handles vp list → vp pm list aliasing
    • crates/vite_global_cli/src/cli.rs — PmCommands::Rebuild (line 1212–1218), top-level Commands enum
    • crates/vite_install/src/commands/rebuild.rs — Core implementation
    • crates/vite_global_cli/src/commands/pm.rs — PmCommands::Rebuild handler

    Verdict: Yes, fixable — low complexity

    The implementation is already done at the vp pm rebuild level. Adding vp rebuild is a matter of wiring the top-level shortcut.

    Implementation plan

    Option A (preferred — consistent with existing vp list pattern): Extend normalize_args() in crates/vite_global_cli/src/main.rs to map vp rebuild / vp rb → vp pm rebuild:

    Some("rebuild" | "rb") => {
        let mut normalized = Vec::with_capacity(args.len() + 1);
        normalized.push(args[0].clone());
        normalized.push("pm".to_string());
        normalized.push("rebuild".to_string());
        normalized.extend(args[2..].iter().cloned());
        normalized
    }

    Option B (alternative): Add a dedicated Commands::Rebuild variant to the top-level Commands enum in cli.rs, with a handler that calls commands::pm::run(cwd, PmCommands::Rebuild { ... }) directly — more explicit but slightly more code.

    Option A is simpler, consistent with how vp list is handled, and requires changes to only one function.

    Potential concerns

    • rb is already a visible_alias on vp pm rebuild — using it as a top-level alias via normalization would shadow it cleanly, but worth verifying there's no conflict.
    • Yarn v1 already has a graceful warning in the existing implementation, so that edge case is handled.
  4. Boshen
    removed their assignment
    on Mar 20, 2026
  5. fengmk2
    assigned
    cpojer
    on Mar 20, 2026
  6. cpojer
    assigned
    fengmk2
    and unassigned
    cpojer
    on Mar 20, 2026
  7. cpojer commented on Mar 20, 2026

    @cpojer
    cpojer
    on Mar 20, 2026
    Member
    More actions

    Yep, agreed we should have this at the top level. No need to add rb as an alias though.

    Reacted by MK (fengmk2) and Alexander Lichter
  8. fengmk2
    closed this as completedin f98a237on Apr 16, 2026
  9. fengmk2
    added a commit that references this issue on Apr 16, 2026

    feat(cli): add top-level rebuild alias (voidzero-dev#1383)

    f98a237
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @fengmk2
    fengmk2

Labels

No labels
No labels

Type

Feature

Fields

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

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.