Reputation: 1001
Is there a way to check is Nuxt.js is being used?
For the UI frameworks development, herewith it's unknown will be used with Nuxt.js or just pure Vue. For example, depending on Vue or Nuxt, we need different link component:
<component is="isNuxt ? 'nuxt-link' : 'router-link'" />
What it the implementation of isNuxt
method?
Upvotes: -1
Views: 163
Reputation: 1730
I think the easy way could be:
const isNuxt = () => !!window.$nuxt
Upvotes: 2