wxt-dev / wxt-dev/wxt

Types are incompatible with NodeNext tsconfig

Open
#1,954 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

pending-triage
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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.