[Vuejs]-RequireJS, Stripe and dependency (Vue component)

0๐Ÿ‘

I worked it out in the end

requirejs.config({
    shim: {
        form: {
            deps: [ 'stripe' ]
        }
    },
    paths: {
        stripe: 'https://js.stripe.com/v3/?noext',
        form: '/js/my-component'
    }
});

require(['stripe', 'form'], function($) { 
    return {};
});

Leave a comment