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 4ecebf4 commit cd7191cCopy full SHA for cd7191c
lib/internal/process/esm_loader.js
@@ -42,13 +42,8 @@ function initializeImportMetaObject(wrap, meta) {
42
const path = getPathFromURL(url);
43
const mod = new Module(path, null);
44
mod.filename = path;
45
+ mod.paths = Module._nodeModulePaths(path);
46
req = makeRequireFunction(mod).bind(null);
-
47
- // remove properties that don't affect ESM loading
48
- // delete req.cache;
49
- // delete req.extensions;
50
- // delete req.main;
51
- // delete req.resolve.paths;
52
return req;
53
}
54
});
0 commit comments