Open jeffberry opened 1 year ago
I confirm this need on my side to pass a lib in ESM and pass the moduleResolution in Node16
Please accept this PR
@peduarte who should we @ to get this looked at? Thank you again for your time! Love the library.
This actually looks really good. If I can get some access, I could merge this and put it into a release.
cc @hadihallak @StephenHaney
@hadihallak @StephenHaney could you please merge this in and put it into a canary release or give @jonathantneal access do do so? This doesn't seem like much effort and would unblock usage of stitches with TypeScript's moduleResolution
other than node
. I would really appreciate it ☮️
This fixes an issue that we are experiencing when setting
moduleResolution
in our tsconfig toNodeNext
. When this is enabled, the module resolution will only allow importing from paths that are defined within theexports
config. Because onlytypes/index.d.ts
is available for import, it is causing these kinds of embedded imports to fail:I think the alternative would be to ensure that all types are exported from the
types/index.d.ts
file.