Skip to content

Commit

Permalink
Fix #1654
Browse files Browse the repository at this point in the history
  • Loading branch information
goto-bus-stop committed Apr 6, 2018
1 parent 0694ce2 commit a9f2ab1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions index.js
Expand Up @@ -85,6 +85,10 @@ function Browserify (files, opts) {
self._bresolve = opts.browserField === false
? function (id, opts, cb) {
if (!opts.basedir) opts.basedir = path.dirname(opts.filename)
// Resolve builtin modules.
if (self._mdeps.options.modules[id]) return process.nextTick(function () {
cb(null, self._mdeps.options.modules[id]);
});
resolve(id, opts, cb)
}
: bresolve
Expand Down

0 comments on commit a9f2ab1

Please sign in to comment.