We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In my sample node.js project:
a.js:
a.js
module.exports = "a.js";
a/index.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:
a/test.js
console.log([require("."), require("./")]);
Prints: [ 'a.js', 'a/index.js' ]
[ 'a.js', 'a/index.js' ]
Also, if we have:
a/b/test2.js:
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.
tests\cases\compiler\relativeModuleWithoutSlash.ts
The text was updated successfully, but these errors were encountered:
No branches or pull requests
In my sample node.js project:
a.js
: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
:Prints:
[ 'a.js', 'a/index.js' ]
Also, if we have:
a/b/test2.js
: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
.The text was updated successfully, but these errors were encountered: