Skip to content

Add the types condition to the package.json#exports#70

Open
jsjames wants to merge 1 commit into
nolimits4web:masterfrom
jsjames:patch-1
Open

Add the types condition to the package.json#exports#70
jsjames wants to merge 1 commit into
nolimits4web:masterfrom
jsjames:patch-1

Conversation

@jsjames
Copy link
Copy Markdown

@jsjames jsjames commented Sep 13, 2025

This is required for TypeScript to work with packages that have exports when using the new moduleResolution: node16/nodenext/bundler settings. When those are not used then TypeScript just ignores package.json#exports - but when you make it aware of exports by using those options then it requires the types to be included in exports and not as the top-level key of package.json

This is required for TypeScript to work with packages that have exports when using the new moduleResolution: node16/nodenext/bundler settings. When those are not used then TypeScript just ignores package.json#exports - but when you make it aware of exports by using those options then it requires the types to be included in exports and not as the top-level key of package.json
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.

1 participant