Skip to content

Cannot find file exported with files in package.json in monorepo #477

@jansedlon

Description

@jansedlon

Describe the bug

In a monorepo, if an internal package (in a monorepo) exports files in package.json file like this

{
  "name": "@monorepo/internal-package",
  "private": true,
  "files": [
    "tsconfig.remix-app.json"
  ]
}

And this package is installed and referenced in tsconfig.json

{
  "extends": ["@monorepo/internal-package/tsconfig.remix-app.json"],
}

And this config is used in vite.config.ts

export default defineConfig({
  resolve: {
    tsconfigPaths: true
  }
})

Then the app crashes with error that the tsconfig file could not be found.
This worked to version 7.1.19, version 7.1.20 broke it.

Reproduction

https://github.com/jansedlon/rolldown-vite-repro

Steps to reproduce

Run pnpm i followed by pnpm dev

System Info

System:
    OS: macOS 26.1
    CPU: (16) arm64 Apple M3 Max
    Memory: 3.01 GB / 48.00 GB
    Shell: 4.0.2 - /opt/homebrew/bin/fish
  Binaries:
    Node: 24.11.0 - /Users/jansedlon/.local/share/nvm/v24.11.0/bin/node
    npm: 11.6.1 - /Users/jansedlon/.local/share/nvm/v24.11.0/bin/npm
    pnpm: 10.12.4 - /Users/jansedlon/.local/share/nvm/v24.11.0/bin/pnpm
    bun: 1.3.1 - /Users/jansedlon/.bun/bin/bun
  Browsers:
    Brave Browser: 141.1.83.118
    Chrome: 141.0.7390.123
    Safari: 26.1
  npmPackages:
    @vitejs/plugin-react: ^4.7.0 => 4.7.0 
    rolldown-vite:  7.1.20

Used Package Manager

pnpm

Logs

No response

Validations

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions