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.
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 https://github.com/developit/microbundle/issues/990 for a related discussion about documenting this as part of
microbundle
's TypeScript guidance.