Skip to content

[Bug?]: PNP incompatible with Vite 8 (rolldown) #7071

@rgischk

Description

@rgischk

Self-service

  • I'd be willing to implement a fix

Describe the bug

I just upgraded a project to using Vite 8 (with rolldown instead of esbuild and rollup). After the upgrade I was no longer able to build my project, because rolldown is unable to resolve imports.

Changing the nodeLinker from pnp to node-modules fixes the problem.

To reproduce

  1. Create a new project using Vite 7 and pnp linker
  2. Build the project successfully
  3. Upgrade to Vite 8
  4. Building the project fails

Environment

Vite 8

Additional context

I assume this happens because the pnp linker changes how modules are resolved. Since rolldown is using native code (Rust) it is probably impossible to patch it like it is done for typescript.

I have not tested this, but I additionally assume that this issue will also occur when using other native build tools, like tsgo, oxlint or oxfmt.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions