Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(package.json): Add 'types/*' to package exports #1115

Open
wants to merge 1 commit into
base: canary
Choose a base branch
from

Conversation

jeffberry
Copy link

This fixes an issue that we are experiencing when setting moduleResolution in our tsconfig to NodeNext. When this is enabled, the module resolution will only allow importing from paths that are defined within the exports config. Because only types/index.d.ts is available for import, it is causing these kinds of embedded imports to fail:

import("@stitches/react/types/css-util").CSS

I think the alternative would be to ensure that all types are exported from the types/index.d.ts file.

@Achaak
Copy link

Achaak commented Nov 30, 2022

I confirm this need on my side to pass a lib in ESM and pass the moduleResolution in Node16

@yovanoc
Copy link

yovanoc commented Dec 1, 2022

Please accept this PR

@smol-honk
Copy link

@peduarte who should we @ to get this looked at? Thank you again for your time! Love the library.

@jonathantneal
Copy link
Contributor

This actually looks really good. If I can get some access, I could merge this and put it into a release.

@peduarte
Copy link
Contributor

peduarte commented Jun 2, 2023

cc @hadihallak @StephenHaney

@fmal
Copy link
Contributor

fmal commented Oct 20, 2023

@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 ☮️

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.

None yet

7 participants