-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Closed
Labels
BugA bug in TypeScriptA bug in TypeScriptFixedA PR has been merged for this issueA PR has been merged for this issue
Milestone

Description
In my sample node.js project:
a.js
:
module.exports = "a.js";
a/index.js
:
module.exports = "a/index.js"
We will load a different one of these modules depending on whether the imported module ends in a /
.
For example:
a/test.js
:
console.log([require("."), require("./")]);
Prints: [ 'a.js', 'a/index.js' ]
Also, if we have:
a/b/test2.js
:
console.log([require(".."), require("../")]);
We get: [ 'a.js', 'a/index.js' ]
TypeScript's node.js module resolution should reflect this behavior, but currently does not.
See tests\cases\compiler\relativeModuleWithoutSlash.ts
.
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptFixedA PR has been merged for this issueA PR has been merged for this issue