Skip to content

Commit

Permalink
module: Add node_modules paths lookup to import.meta.require
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevin Smith authored and MylesBorins committed Jul 9, 2018
1 parent 4ecebf4 commit cd7191c
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions lib/internal/process/esm_loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,8 @@ function initializeImportMetaObject(wrap, meta) {
const path = getPathFromURL(url);
const mod = new Module(path, null);
mod.filename = path;
mod.paths = Module._nodeModulePaths(path);
req = makeRequireFunction(mod).bind(null);

// remove properties that don't affect ESM loading
// delete req.cache;
// delete req.extensions;
// delete req.main;
// delete req.resolve.paths;
return req;
}
});
Expand Down

0 comments on commit cd7191c

Please sign in to comment.