I'm having trouble loading Stripe.js with Require.js. My setup looks a bit like this
requirejs.config({
paths: {
'stripe': 'https://js.stripe.com/v3/?noext'
},
shim: {
'stripe': {
exports: 'stripe'
}
}
});
This actually does work, that is, I can see the script tag in the dom but when I require it it's undefined. Any ideas what could be happening here?
The global that stripe exports is
Stripewith an uppercase "S". Theexportsneeds to match the global export exactly, meaning case.This works:
This doesn't: