Closed
Description
Bug Report
🔎 Search Terms
tsconfig, exports, extends
🕗 Version & Regression Information
I encountered this issue in version typescript@4.7.0-dev.20220408
.
Error description
You can use the tsconfig.json extends field to inherit configuration options from another tsconfig file. The base tsconfig file can be located in another package, like demonstrated here.
🙁 Actual behavior
Let's say I'm in package my-app
, which contains a tsconfig with "extends": "my-lib/tsconfig-base.json
. Typescript ignores the exports field of package my-lib
. It will always look for a file tsconfig-base.json
in the my-lib root directory, even if an "exports" mapping exists for this name.
🙂 Expected behavior
I expected Typescript to use the standard node resolution algorithm when looking up the tsconfig file on disk, which respects the "exports" field.