We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4cf437c commit 36cd484Copy full SHA for 36cd484
lib/internal/modules/run_main.js
@@ -79,10 +79,9 @@ function shouldUseESMLoader(mainPath) {
79
function runMainESM(mainPath) {
80
const { loadESM } = require('internal/process/esm_loader');
81
const { pathToFileURL } = require('internal/url');
82
+ const main = pathToFileURL(mainPath).href;
83
84
handleMainPromise(loadESM((esmLoader) => {
- const main = path.isAbsolute(mainPath) ?
85
- pathToFileURL(mainPath).href : mainPath;
86
return esmLoader.import(main, undefined, { __proto__: null });
87
}));
88
}
0 commit comments