I recently upgraded one of my projects to TypeScript 4.5 and it breaks if the underlying package has defined export map.
I am sharing this repo which demonstrates the issue in isolation.
- The repo has two sub-directories.
package
andapp
. - The
package
defines the export map along withtypes
key inside thepackage.json
file. The types exports an ambient module. - The
app
installs thepackage
and imports the ambient module. - Running
npm run build
fails if theapp
is using[email protected]
. However compiles fine if using[email protected]
.