ForbesLindesay / browserify-middleware

express middleware for browserify, done right
http://browserify.org
MIT License
381 stars 66 forks source link

Multiple bundles don't work with browserify-shim #43

Closed gabegorelick closed 10 years ago

gabegorelick commented 10 years ago

Splitting up the bundles does not work with modules that are shimmed with browserify-shim.

I have a repo illustrating this at https://github.com/gabegorelick/browserify-shim-multiple. Note that everything works fine when done with browserify directly. It also works fine if only non-shimmed modules are included in the external bundle, e.g. if we only exclude jquery (the one from npm). It's only when you try to exclude shimmed modules, e.g. angular, and include them in a separate bundle that things break. And of course, everything works fine as a single bundle.

See https://github.com/thlorenz/browserify-shim/issues/40 for more context.

gabegorelick commented 10 years ago

Looks like the issue only pops up when d3 (or anything that depends on it) is in the external module. Keeping d3 and everything that depends on it in the main module makes everything work. So it's something about browserify-middleware + browserify-shim + d3. I haven't been able to reproduce the issue with any other modules besides d3.

ForbesLindesay commented 10 years ago

If this only occurs with D3 I'm going to consider it as a wont-fix here. If you can come up with a small reproducible test case then I'll reconsider.