d3xter-dev / sitemap-module-nuxt-3

Sitemap Module for Nuxt 3
https://sitemap.nuxtjs.org
MIT License
63 stars 12 forks source link

Issues when trying to access Runtime Config using DynamicRoutes #23

Open enrico-bagattin opened 1 year ago

enrico-bagattin commented 1 year ago

Hello, thank you for this great package! I have followed the guide for dynamic routes, but when I am trying to access to the runtime config in sitemap_routes.ts I got this error:

ℹ Generating sitemaps

 ERROR  nuxt instance unavailable

  at useNuxtApp (node_modules/nuxt/dist/app/nuxt.mjs:130:13)
  at useRuntimeConfig (node_modules/nuxt/dist/app/nuxt.mjs:137:10)

If I place the API Key directly in the code it works well.