Skip to content

Commit

Permalink
use _process to mask system path information
Browse files Browse the repository at this point in the history
  • Loading branch information
James Halliday committed Jul 22, 2014
1 parent 467f173 commit 5fe121b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
7 changes: 6 additions & 1 deletion index.js
Expand Up @@ -194,7 +194,12 @@ Browserify.prototype._createDeps = function (opts) {
}
return stream;
},
function (file) { return insertGlobals(file, opts) }
function (file) {
var vars = {
process: function () { return "require('_process')" }
};
return insertGlobals(file, xtend(opts, { vars: vars }));
}
];
return mdeps(mopts);
};
Expand Down
1 change: 1 addition & 0 deletions lib/builtins.js
Expand Up @@ -35,3 +35,4 @@ exports.url = require.resolve('url/');
exports.util = require.resolve('util/util.js');
exports.vm = require.resolve('vm-browserify');
exports.zlib = require.resolve('browserify-zlib');
exports._process = require.resolve('process/browser');

0 comments on commit 5fe121b

Please sign in to comment.