Skip to content

fix: missing "types" in package.json for css-tokenizer #1273

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

Closed
wants to merge 1 commit into from

Conversation

amertak
Copy link

@amertak amertak commented Feb 9, 2024

Description:

This fixes missing typings when installing the package using npm, yarn, pnpm, etc...
Types are there, they are just not visible.

This fixes missing typings when installing the package using npm
@amertak amertak changed the title fix: missing "types" in package.json fix: missing "types" in package.json for css-tokenizer Feb 9, 2024
@romainmenke
Copy link
Member

Hi @amertak,

That types is left empty is by design.
We do not support typings for common js, only for es modules.

@romainmenke
Copy link
Member

@amertak Can you confirm that types are only missing if your project is a commonjs project?

@amertak
Copy link
Author

amertak commented Feb 9, 2024

@romainmenke Trying to make it work but with no success.
Our project is esm.
I have "type": "module" in package.json.

@romainmenke
Copy link
Member

Can you create a minimal reproduction as a github repo?

@amertak
Copy link
Author

amertak commented Feb 9, 2024

We have a problem in moduleResolution set to node in tsconfig. If changed to bundler or nodenext types work.

Going to close it. Thanks for help @romainmenke

@romainmenke
Copy link
Member

Can you also try with node16 ?

node (if I recall correctly) is actually commonjs

@amertak amertak closed this Feb 9, 2024
@romainmenke
Copy link
Member

Always happy to help 🙇

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants