Skip to content

Conversation

@atilafassina
Copy link
Member

@atilafassina atilafassina commented Nov 9, 2025

moduleResolution: "node" is a legacy setting that will soon be deprecated. It's intended for Node < 10.
NodeNext targets Node 16 and onwards.

Implementation

  • Add .js extension to all relative imports
  • Replace moduleResolution to NodeNext
  • Replace module to NodeNext
  • Adds skipLibCheck: true

Type Analysis

Latest on NPM

Environment @solidjs/router
node16 (from ESM) 🥴 Internal resolution error
bundler 🟢
node10 (ignored) 🟢
node16 (from CJS) (ignored) ⚠️ ESM (dynamic import only)
(ignored) 🥴 Internal resolution error
pnpx @arethetypeswrong/cli --profile esm-only --from-npm @solidjs/router -f table

This PR

@solidjs/router
node10 🟢
node16 (from CJS) ⚠️ ESM (dynamic import only)
node16 (from ESM) 🟢 (ESM)
bundler 🟢
pnpx @arethetypeswrong/cli --profile esm-only --pack .

Final note

Since type-checks and build passes, I don't expect any decrease in compatibility going forward. But adding the .js extension even when keeping modeResolution: node seems to have helped tsc, I expect this new setting to make types more reliable.

@changeset-bot
Copy link

changeset-bot bot commented Nov 9, 2025

🦋 Changeset detected

Latest commit: 65f1d43

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@solidjs/router Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@atilafassina atilafassina force-pushed the infra/module-resolution branch from 1a66b18 to b8f0232 Compare November 9, 2025 11:23
@atilafassina atilafassina marked this pull request as ready for review November 9, 2025 11:26
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.

3 participants