Skip to content

Commit

Permalink
fix browserify
Browse files Browse the repository at this point in the history
  • Loading branch information
rauchg committed Mar 12, 2014
1 parent 52e288c commit 5f805c3
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion support/browserify.js
Expand Up @@ -25,6 +25,17 @@ function build(fn){
opts.entries = [path];
var bundle = {};
bundle.standalone = 'eio';
bundle.insertGlobalVars = ['global'];
bundle.insertGlobalVars = { global: glob };
browserify(opts).bundle(bundle, fn);
}

/**
* Populates `global`.
*
* @api private
*/

function glob(){
return 'typeof self !== "undefined" ? self : '
+ 'typeof window !== "undefined" ? window : {}';
}

0 comments on commit 5f805c3

Please sign in to comment.