You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to import the preact-router and preact-router/match modules from inside a project written using TypeScript 4.7+ with moduleResolution: "NodeNext", TypeScript is unable to find the corresponding type definitions.
If I manually modify node_modules/preact-router/package.json to add types fields to the preact-router and preact-router/matchexports, then TypeScript will pick up the type definitions:
Can this module be published with the addition of those types fields in the exports section of package.json? I'm happy to file a PR to add them if that seems reasonable.
See developit/microbundle#990 for a related discussion about documenting this as part of microbundle's TypeScript guidance.
The text was updated successfully, but these errors were encountered:
When trying to
import
thepreact-router
andpreact-router/match
modules from inside a project written using TypeScript 4.7+ withmoduleResolution: "NodeNext"
, TypeScript is unable to find the corresponding type definitions.If I manually modify
node_modules/preact-router/package.json
to addtypes
fields to thepreact-router
andpreact-router/match
exports
, then TypeScript will pick up the type definitions:Can this module be published with the addition of those
types
fields in theexports
section ofpackage.json
? I'm happy to file a PR to add them if that seems reasonable.See developit/microbundle#990 for a related discussion about documenting this as part of
microbundle
's TypeScript guidance.The text was updated successfully, but these errors were encountered: