Skip to content

Commit

Permalink
module: ensure exact file url passed to top-level import for main
Browse files Browse the repository at this point in the history
  • Loading branch information
guybedford committed Sep 13, 2017
1 parent cb94905 commit fccab24
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/module.js
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ Module._load = function(request, parent, isMain) {
if (experimentalModules) {
if (filename === null || /\.mjs$/.test(filename)) {
try {
ESMLoader.import(request).catch((e) => {
ESMLoader.import(getURLFromFilePath(filename).href).catch((e) => {
console.error(e);
process.exit(1);
});
Expand Down

0 comments on commit fccab24

Please sign in to comment.