Skip to content

Commit

Permalink
Exclude "process" and "buffer" when "bundleExternal === false"
Browse files Browse the repository at this point in the history
  • Loading branch information
zertosh committed Aug 22, 2015
1 parent 7487bff commit cf32d77
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions index.js
Expand Up @@ -552,8 +552,8 @@ Browserify.prototype._createDeps = function (opts) {
}, opts.insertGlobalVars);

if (opts.bundleExternal === false) {
delete vars.process;
delete vars.buffer;
vars.process = undefined;
vars.buffer = undefined;
}

return insertGlobals(file, xtend(opts, {
Expand Down
2 changes: 1 addition & 1 deletion test/bundle_external_global.js
Expand Up @@ -18,7 +18,7 @@ test('bundle external global', function (t) {
process: process
});
function log (msg) {
t.equal(typeof msg.nextTick, 'function');
t.equal(msg, process);
}
});
});

0 comments on commit cf32d77

Please sign in to comment.