Closed rmi22186 closed 6 years ago
Hi @rmi22186 - thank you for making this pull - this approach seems like it should work, however, if you wish to use npm, I believe that
var appboy = require('appboy-web-sdk');
window.appboy = appboy;
should resolve the issue that you encountered
Ah, yes I did try that initially but it was interfering with our tests since we stub the appboy methods. However, I made it work by instead doing
window.appboy = require('appboy-web-sdk')
Figured I'd open up a new PR instead so that it's cleaner: https://github.com/mparticle-integrations/mparticle-javascript-integration-appboy/pull/12
Hi @froodian -
I used npm at first, and while it worked fine, it looks like
appboy
was not accessible in my console in a test app, and some of our clients will occasionally invokeappboy
even though we take care of most of the mapping, so I don't want to break any of their code.Instead, I pulled the
appboy.min.js
script and am loading it in during a build process instead and due to how our system works, we need to commit the build. Due to the build's affect on how the PR looks, I recommend stepping through each commit individually so it's more clear.We are delaying updating to 2.2 pending some customer feedback, which is why the minified appboy is still on 2.0.9, pulled from https://js.appboycdn.com/web-sdk/2.0/appboy.min.js.
Let me know what feedback you have.
Resolves https://github.com/mparticle-integrations/mparticle-javascript-integration-appboy/issues/10