Skip to content

Commit 0853730

Browse files
mishoory
authored andcommitted
realpath files during module load
1 parent 2e76cd3 commit 0853730

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/node.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@
173173
try {
174174
var stats = fs.statSync(requestPath);
175175
if (stats && !stats.isDirectory()) {
176-
return requestPath;
176+
return fs.realpathSync(requestPath);
177177
}
178178
} catch (e) {}
179179
return false;
@@ -281,6 +281,7 @@
281281
if (!filename) {
282282
throw new Error("Cannot find module '" + request + "'");
283283
}
284+
id = filename;
284285
return [id, filename];
285286
}
286287

0 commit comments

Comments
 (0)