thlorenz / browserify-shim

📩 Makes CommonJS incompatible files browserifyable.
MIT License
933 stars 87 forks source link

Should allow shim configuration settings outside of package.json #187

Closed mitermayer closed 8 years ago

mitermayer commented 8 years ago

I am struggling to understand why do we have to set the shims on the package.json. Is there another way to do the same thing ?

mitermayer commented 8 years ago

Would be great if that could be done via a configuration when requiring browserify-shim.

var shim = require('browserify-shim").configure({
    ...
});

// this would allow us to do that
 browserify({
    entries: './entry.js',
    debug: true,
    transforms: [shim, reactify, babelify]  });
bendrucker commented 8 years ago

The right API for this is described in #146. It would be a pretty significant change and I highly doubt either Thorsten or I will have the time anytime soon to overhaul everything to support transform options. We'd need someone to step up in a big way on a PR here. It's hard for me to justify spending huge amounts of time on stuff like this since I've mitigated the need to use b-shim and see a lot of people doing the same.

kolya-ay commented 8 years ago

@mitermayer, you could just use exposify for that.