browserifyes5-shim

How to include es5-shim in browserify bundle


Should I do something like the following in my entry point:

var es5Shim = require('es5-shim');

That gets included properly in the bundle but it just seems like there has to be a better way and I'm missing it.


Solution

  • Use -r to require additional dependencies:

    $ browserify -r "es5-shim" ...