Skip to content
This repository was archived by the owner on Mar 19, 2026. It is now read-only.
This repository was archived by the owner on Mar 19, 2026. It is now read-only.

Chunks are missing viteMetadata when building for SSR #264

@teemingc

Description

@teemingc

Describe the bug

When building with SSR enabled, I expect the viteMetadata property to be present on the chunks from the bundle data in the writeBundle hook. This doesn't seem to be the case only for rolldown-vite.

Reproduction

https://stackblitz.com/edit/vitejs-vite-sumh3tff?file=README.md&terminal=dev

Steps to reproduce

  1. Install the packages with pnpm i then build with rolldown-vite installed using pnpm build.
  2. Observe that no chunk filenames are logged from our custom plugin that looks for chunks with viteMetadata.
  3. Remove the pnpm override from the package.json and re-run pnpm i to use regular Vite.
  4. Run the build again with pnpm build.
  5. Observe that the index chunk has the viteMetadata property.

System Info

System:
    OS: Linux 5.0 undefined
    CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Memory: 0 Bytes / 0 Bytes
    Shell: 1.0 - /bin/jsh
  Binaries:
    Node: 20.19.1 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 10.8.2 - /usr/local/bin/npm
    pnpm: 8.15.6 - /usr/local/bin/pnpm
  npmPackages:
    rolldown-vite:  6.3.21

Used Package Manager

pnpm

Logs

No response

Validations

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions