Skip to content

Commit

Permalink
Support require.resolve options (added in Node v8.9.0)
Browse files Browse the repository at this point in the history
  • Loading branch information
zertosh committed Aug 7, 2018
1 parent 3700d11 commit d6f2995
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions v8-compile-cache.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,8 @@ class NativeCompileCache {
function require(id) {
return mod.require(id);
}
require.resolve = function(request) {
return Module._resolveFilename(request, mod);
require.resolve = function(request, options) {
return Module._resolveFilename(request, mod, false, options);
};
require.main = process.mainModule;

Expand Down

0 comments on commit d6f2995

Please sign in to comment.