Skip to content

Support Bun as runtime for loading vite.config.ts in vp lint #1503

@sagar-dev04

Description

@sagar-dev04

Description

As a developer using Vite+ with Bun as my package manager, I want vp lint to
use Bun to load vite.config.ts so that Node.js is not required in my toolchain.

Currently vp lint is the only command in the entire Vite+ toolchain that
requires Node.js >=22.18.0. Everything else — vp build, vp dev, vp fmt,
vp staged, vp install — works entirely through Bun when bun.lock is present.

Error seen when Node < 22.18.0:

TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".ts"
TypeScript config files require Node.js ^20.19.0 || >=22.18.0.
Detected Node.js v22.15.1.

This forces Bun-first projects to maintain a Node installation solely for
vp lint config loading, which defeats the purpose of a unified Bun toolchain.

Suggested solution

When bun.lock or bun.lockb is detected in the workspace root (the same
detection logic already used by vp install), use Bun instead of Node to
load vite.config.ts for lint configuration.

Alternatively, respect a VP_ACTIVE_NODE or VP_CONFIG_RUNTIME environment
variable that lets users specify which binary to use for config loading.

We tested symlinking bun as node in PATH — vp lint ran correctly with Bun
as the runtime, suggesting there is no real incompatibility, only a hardcoded
node binary lookup.

Alternative

Use .oxlintrc.json instead of vite.config.ts for lint config — this bypasses
Node entirely since Oxlint reads JSON natively. However the official Vite+ docs
explicitly state "We do not recommend using .oxlintrc.json with Vite+",
so this is not a proper solution for users following the recommended setup.

Additional context

Environment:

  • Package manager: Bun 1.3.10 (bun.lock present)
  • vite-plus: 0.1.20
  • OS: macOS darwin-arm64
  • Node currently required: v25.9.0 (used only for this one step)

All other vp commands use Bun correctly:

Command Runtime Works without Node?
vp install Bun (delegates via bun.lock detection)
vp build / vp dev Bun loads vite.config.ts
vp fmt Pure Rust, no runtime needed
vp staged Bun orchestrates the hook
vp lint Requires Node >=22.18.0 to load vite.config.ts

vp lint is the only outlier. Making it consistent with the rest of the
toolchain would allow Bun-first projects to run entirely without Node.

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