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 types for package.json exports (#542, #543, #545) #549

Merged
merged 1 commit into from
Feb 13, 2024

Conversation

fruchtose-stripe
Copy link
Contributor

@fruchtose-stripe fruchtose-stripe commented Feb 13, 2024

Summary & motivation

Two fixes here:

  1. Types for ES modules need to be specified on a per-module basis, as suggested in Types that are found, but not exported in package.json, should still be usable microsoft/TypeScript#52363 (comment)
  2. A separate path reference fix for the pure module

Testing & documentation

I tested this against packages which were compiled in webpack/vite with "moduleResolution": "node16" and "moduleResolution": "bundler" in tsconfig.json. I confirmed this fix works fore TypeScript 4+.

@fruchtose-stripe fruchtose-stripe merged commit 9c24a64 into master Feb 13, 2024
2 checks passed
@fruchtose-stripe fruchtose-stripe deleted the fruchtose/exports-fix branch February 13, 2024 22:23
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.

2 participants