Visitar URL original
perf-kit: no rolldown found when vite bundles it (Vite+) · Issue #11504 · rolldown/rolldown · GitHub
Skip to content

perf-kit: no rolldown found when vite bundles it (Vite+) #11504

Open

Description

@ethan-huo

What happens

With Vite+, vite is an alias of @voidzero-dev/vite-plus-core, which bundles rolldown inside its own dist/rolldown/ (its package.json records the version under bundledVersions.rolldown). No rolldown package resolves from vite, so @rolldown/perf-kit@0.1.0 cannot see it:

  • worker-config prints no rolldown package resolves from <app> - install the app's dependencies first (vite >= 8 brings rolldown). (appRolldown in lib/rolldown-support.mjs).
  • The generated perf-kit.vite.config.ts throws at build: Cannot find module 'rolldown/package.json' from '…/@voidzero-dev/vite-plus-core/package.json' (assertReportMode in the lib/worker/config.mjs template).

The bundled rolldown has the report mode: vite-plus-core@1.5.0 bundles rolldown 1.2.16, and devtools: { mode: 'report' } writes the report. With the guard bypassed, worker-scan, why and what-if work.

Reproduce

A project on vite-plus@1.5.0 ("vite": "npm:@voidzero-dev/vite-plus-core@^1.5.0") with a Cloudflare Worker:

npx perf-kit worker-config --app .
npx vite build --config perf-kit.vite.config.ts

Suggested fix

When rolldown/package.json does not resolve from vite and vite has a dist/rolldown/, probe vite's own dist for the report mode, and take the version from bundledVersions.rolldown. rolldown-install should refuse that case, since it would copy a rolldown package over vite itself. We carry this as a local patch (about 30 lines, in appRolldown, installCheckoutRolldown and the shim's assertReportMode) and can open a PR if that helps.

Activity

  1. IWANABETHATGUY commented on Nov 5, 2026

    @IWANABETHATGUY
    Member

    @rolldown/perf-kit requires rolldown 1.3.0+. We need to wait for Vite and Vite+ to upgrade to the latest rolldown

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

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Fields

Priority

None yet

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions