browserify / browserify-handbook

how to build modular applications with browserify
Other
4.58k stars 292 forks source link

Standalone applicable? #79

Closed DigitalFlow closed 7 years ago

DigitalFlow commented 7 years ago

Hello everyone,

I'm using browserify for bundling my HttpClient with Bluebird for promises, since it has to be cross-browser compatible and IE does not support promises natively. Now I'm having the issue, that I get the promises returned alright in IE, but since bluebird is only available in my IIFE, I can't use things like Promise.all without having to include bluebird on the page also. I thought of using standalone for making bluebird available in outer scope. Did I understand correctly, that this is its purpose? I changed my npm build script to browserify src/js/WebApiClient.js --standalone XrmWebApiClient > Publish/WebApiClient.js for making the standalone bundle, however I don't really get the purpose of the XrmWebApiClient object. What is its purpose?

Thanks for your help.

Kind Regards, Florian