DEV Community

Discussion on: Sitemap for dynamic routes in NuxtJS

Collapse
 
luisjoserivera profile image
Luis Jose Rivera • Edited

Or simply avoid the whole module and TS thing by adding this to nuxt.config.js

hooks: {
generate: {
async done(context) {
const allRoutes = await Array.from(context.generatedRoutes);
context.options.sitemap.routes = await [...allRoutes];
},
},
},