Skip to content

Update moduleResolution default value in tsconfigRules#3609

Open
jonkoops wants to merge 1 commit into
microsoft:v2from
jonkoops:fix/update-module-resolution-default-value
Open

Update moduleResolution default value in tsconfigRules#3609
jonkoops wants to merge 1 commit into
microsoft:v2from
jonkoops:fix/update-module-resolution-default-value

Conversation

@jonkoops

@jonkoops jonkoops commented Jul 9, 2026

Copy link
Copy Markdown

The documented default value for the moduleResolution compiler option is outdated since TypeScript 6.0.

In TypeScript 5.x, CommonJS mapped to Node10, Preserve mapped to Bundler, and Classic was the fallback for all other module modes. Since TypeScript 6.0, this was updated in two steps:

  • #62338 changed CommonJS from Node10 to Bundler (as part of deprecating --moduleResolution node10)
  • #62669 changed the ES module series (ES2015, ES2020, ES2022, ESNext) from Classic to Bundler, keeping Classic only for the deprecated modes (None, AMD, UMD, System)

The net result is that Bundler is now the default for everything except the deprecated module modes and the Node-family (Node16+, NodeNext).

The relevant computation logic in the compiler:

https://github.com/microsoft/TypeScript/blob/v6.0.2/src/compiler/utilities.ts#L9077-L9098

Relates to microsoft/TypeScript#63392

Signed-off-by: Jon Koops <jonkoops@gmail.com>
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