Skip to content

Commit 10bb023

Browse files
authored
Merge pull request #235 from tordans/patch-1
Docs: NoResolution: Hint at how to ignore the issue
2 parents c9fc9cc + f66f316 commit 10bb023

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

docs/problems/NoResolution.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,6 @@ When this problem occurs for the `node10` resolution option but not any others,
3737
In this example, an import of `"pkg/subpath"` can be used in Node 12+ and modern bundlers, but would fail to resolve in Node 10. Accordingly, TypeScript’s `--moduleResolution node10` (also confusingly known as `node`, because history) does not resolve `"exports"` either.
3838

3939
While few libraries care about supporting a long-past EOL version of Node, maintainers of very popular libraries should be aware that many TypeScript users are still using `--moduleResolution node`. If they aren’t literally using Node 10, they really should move away from it, but sometimes migrating can be difficult because it introduces new errors caused by _incorrect dependency typings_—the problem this tool was made to diagnose. Popular libraries often choose to adopt a strategy that allows `--moduleResolution node10` to work even without `"exports"` support. https://github.com/andrewbranch/example-subpath-exports-ts-compat demonstrates several such strategies.
40+
41+
42+
> You can use the [`--profile node16` option on the CLI](https://github.com/arethetypeswrong/arethetypeswrong.github.io/tree/main/packages/cli#profiles) to ignore issues that only affect `--moduleResolution node10`.

0 commit comments

Comments
 (0)