so you you can't use a conditional requires with browserify as it does
static analysis, but something similar to

```
function (string) {
  if (!process.browser) {
    return crypto.createHash('md5').update(string).digest('hex');
  } else {
    return md5(string);
  }
};
```

and `"crypto": false` in the package.json is probably what you want.


On Mon, Apr 14, 2014 at 10:36 AM, Tomasz Kołodziejski <
notifications@github.com> wrote:

> In utils.js:
>
> > @@ -65,3 +65,14 @@ exports.sequentialize = function (queue, promiseFactory) {
> >      });
> >    };
> >  };
> > +
> > +var crypto = require('crypto');
>
> This one is importing crypto (browserify does it) so in browser we have
> two crypto libraries which is not what we want. We should require them
> depending on process.browser or use some browserify magic (
> https://github.com/pouchdb/pouchdb/blob/3d062ac440b07e04b55e39dc84a8f5e98bd39c0b/package.json#L79
> )
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/pouchdb/mapreduce/pull/106/files#r11587092>
> .
>



-- 
-Calvin W. Metcalf