Not sure if making a difference but can you try this code instead of the routes.cart_add_url
fetch(window.Shopify.routes.root + 'cart/add.js', config)
Not sure if making a difference but can you try this code instead of the routes.cart_add_url
fetch(window.Shopify.routes.root + 'cart/add.js', config)