Skip to content

Commit

Permalink
Fix badly formed module paths on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
julian-maughan committed Nov 7, 2015
1 parent bbfabaa commit 7f80305
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,12 +115,14 @@ Browserify.prototype.require = function (file, opts) {
var expose = opts.expose;
if (file === expose && /^[\.]/.test(expose)) {
expose = '/' + path.relative(basedir, expose);
expose = expose.replace(/\\/g, '/');
}
if (expose === undefined && this._options.exposeAll) {
expose = true;
}
if (expose === true) {
expose = '/' + path.relative(basedir, file);
expose = expose.replace(/\\/g, '/');
}

if (isStream(file)) {
Expand Down

0 comments on commit 7f80305

Please sign in to comment.