Skip to content

Conversation

@ilogico
Copy link
Contributor

@ilogico ilogico commented Apr 9, 2022

TypeScript now supports node12's module resolution, which looks at the exports entry in package.json to resolve files.

Because preact publishes type definitions in a different folder, TS fails to resolve them.

https://devblogs.microsoft.com/typescript/announcing-typescript-4-7-beta/#package-json-exports-imports-and-self-referencing

Adding the "types" entries in the subpath exports seem to fix it.

This PR adds these entries to the subpath exports that seem to have appropriate type definitions.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 99.44% when pulling 4cd02a7 on ilogico:support-module-nodenext into c18db4d on preactjs:master.

@misode
Copy link

misode commented May 6, 2022

@JoviDeCroock When could I see this in a release?

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

Successfully merging this pull request may close these issues.

4 participants