Closed PSoltes closed 5 months ago
my build doesn't complain about this, can you share a little more info so i can reproduce it? what version of node, typescript, courier-react are you using?
im sure you are right but i want to be able to verify since mine is working fine
Other packages node - 20.13.1 typescript - 5.3.3 Courier packages "@trycourier/courier": "^6.1.1", "@trycourier/react-hooks": "^5.1.1", "@trycourier/react-provider": "^5.1.1", "@trycourier/react-toast": "^5.1.1",
one more thing I think is relevant is tsconfig, esp. moduleResolution value
"module": "ESNext",
"target": "ESNext",
"moduleResolution": "Bundler",
ok thanks, ill try this out. ill most likely need to update a bunch of our packages if this is required for a setup like yours
Thanks. And to reproduce it, I am quite sure now, that moduleResolution
of bundler
or node16/nodenext
is necessary, cause only those actually use exports
field in package.json
. https://www.typescriptlang.org/tsconfig/#moduleResolution
any updates on this? should we create a PR for this thing?
Hi! Yep I merged the change but we need to do a release and it's bundled in a 6.0 breaking change
It should be released soon :)
released 6.0
Thanks so much
above specification will result in ts complaining that
Could not find a declaration file for module '@trycourier/react-hooks'
. Declaring something like below solves the issue.