Types are incompatible with NodeNext tsconfig
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 10.5k
- Forks
- 564
- PR merge metrics
- No merged PRs in 30d
Description
Describe the bug
The exported types don't use extensions, so they're faux esm and fail to import in modern moduleResolution settings.
Reproduction
https://arethetypeswrong.github.io/?p=wxt%400.20 (this is probably more minimal than my actual project)
Steps to reproduce
Given tsconfig.json of a wxt starter, add:
{
"compilerOptions": {
"module": "nodenext",
"moduleResolution": "nodenext",
}
}
tsc should complain that Module '"wxt"' has no exported member ...
System Info
n/a
Used Package Manager
pnpm
Validations
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the minimal reproduction at the linked arethetypeswrong.dev report and the wxt starter's tsconfig.json, then run tsc with module and moduleResolution set to nodenext. Trace how the package's exported types are generated and verify that the reported wxt exports resolve without TypeScript errors under NodeNext.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100