I’m having issues setting up app-bridge on my Nuxt app. This is my Nuxt config:
app: {
head: {
meta: [{ name: 'shopify-api-key', content: process.env.SHOPIFY_API_KEY || '' }],
script: [
{ src: 'https://cdn.shopify.com/shopifycloud/app-bridge.js', defer: false, async: false },
{ src: 'https://cdn.shopify.com/shopifycloud/polaris.js', defer: false, async: false }
]
}
},
Whenever I load app-bridge.js, my Nuxt app UI stops loading completely, without any errors.
I attempt to open my browser console and see what the value of window.shopify is, but get undefined
window.shopify
undefined
It feels like loading this script completely blocks execution of everything else, as I get no logs about window.shopify not being found or anything similar (I have useAppBridge composable that should be looking for it). Commenting the app-bridge.js script out makes the whole app load again, but, of course, there is no app-bridge then.