Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fails to resolve tsconfig.json extends by exports field when using yarn pnp #3698

Closed
sapphi-red opened this issue Mar 14, 2024 · 1 comment
Closed

Comments

@sapphi-red
Copy link
Contributor

When a tsconfig.json has extends and that uses exports field to be resolved and using yarn pnp, esbuild fails to resolve the base tsconfig file. The following warning is output.

▲ [WARNING] Cannot find base config file "D:\\path\\to\\project\\packages\\tsconfigs\\config" [tsconfig.json]

    tsconfig.json:2:13:
      2 │   "extends": "tsconfigs/config",
        ╵              ~~~~~~~~~~~~~~~~~~

By running yarn show-config in packages/app, I can see TypeScript resolving it without issue.

If I set nodeLinker: pnpm or nodeLinker: node-modules, esbuild does not output any warnings.

Reproduction: https://github.com/sapphi-red-repros/esbuild-yarn-pnp-tsconfig-extends-exports-field-repro
Original issue: vitejs/vite#16156

@evanw
Copy link
Owner

evanw commented Mar 14, 2024

Thanks for the report. I can reproduce this. Here's a link to this reproduction on esbuild's playground (mostly for myself):

Playground link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants