NuxtN
Nuxt10mo ago
11 replies
lorenzofiamingo

Nuxt Content is slow

I’m using Nuxt Content as a CMS for some of my pages, but I’m experiencing noticeable delays during page loading. I’m not sure what’s causing it. I also tried integrating NuxtHub with the following configuration in nuxt.config.ts
content: {
  preview: {
    api: 'https://api.nuxt.studio',
  },
  database: {
    type: 'd1',
    bindingName: 'DB',
  },
}

However, this call remains consistently slow:
const { data: page } = await useAsyncData('index', () => {
  return queryCollection('content').path('/').first()
})

It’s really strange because other pages where I make calls to hubDB in the setup function load instantly.
Is there anything I can do to improve performance when using Nuxt Content with D1 and NuxtHub?
I came across this GitHub issue, but it doesn’t seem to be resolved yet.

Would my only real alternative be to stop using Nuxt Content altogether, or are there workarounds or best practices to speed it up?
GitHub
The file-based CMS for your Nuxt application, powered by Markdown and Vue components. - Issues · nuxt/content
Issues · nuxt/content
Was this page helpful?