Globals #386

wants to merge 3 commits into


None yet
3 participants

amiuhle commented Apr 22, 2013

Option to add provide custom global process and Buffer implementations, currently only via grunt-browserify:

browserify: {
  bundle: {
    src: [],
    require: ['mongodb', 'tcp_wrap-chromeify'],
    dest: 'app/scripts/vendor/bundle.js',
    ignore: 'node_modules/browser-resolve/node_modules/buffer-browserify/index.js',
    options: {
      globals: {
        process: 'browser-resolve/builtin/process',
        Buffer: 'buffer-browserify'

dominictarr commented Apr 24, 2013

does this depend on this pull request: shtylman/node-browser-resolve#17

I can see that you have changed the package.json, but I can't see anything regarding globals in it.

amiuhle commented Apr 24, 2013

@dominictarr No, it doesn't - sorry, that probably shouldn't even be part of the pull request. Must have slipped in during development.


dominictarr commented Apr 24, 2013

Can this be used via the api? (without grunt?)
can you post an example using it without grunt (or even better - add a readme section to your pull request)

note, I'm not the module maintainer, but I think this is what @substack would say if he was less busy.


substack commented Dec 19, 2013

You can currently override the buffer implementation using opts.builtins. It would be best to get a separate pull request for just setting process to a custom thing.

@substack substack closed this Dec 19, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment