Skip to content

Commit fccab24

Browse files
committed
module: ensure exact file url passed to top-level import for main
Fixes: #15374
1 parent cb94905 commit fccab24

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/module.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,7 @@ Module._load = function(request, parent, isMain) {
435435
if (experimentalModules) {
436436
if (filename === null || /\.mjs$/.test(filename)) {
437437
try {
438-
ESMLoader.import(request).catch((e) => {
438+
ESMLoader.import(getURLFromFilePath(filename).href).catch((e) => {
439439
console.error(e);
440440
process.exit(1);
441441
});

0 commit comments

Comments
 (0)