Load Stripe.js with Require.js
问题 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? 回答1: The global that stripe exports is Stripe with an uppercase "S". The exports needs to match the global export exactly , meaning case. This