generateSitemaps id issue in production
Unanswered
Largehead hairtail posted this in #help-forum
Largehead hairtailOP
i'm calling http://127.0.0.1:3000/books/sitemap/20.xml
the console.log shows 2, do you know why this problem is happened in approute?
that works correctly with not found error in dev mode, but that has above bug in production.
export async function generateSitemaps() {
// Fetch the total number of products and calculate the number of sitemaps needed
return [{ id: 1 }, { id: 2 }];
}
export default async function bookSitemap({
id: page,
}: {
id: number;
}): Promise<MetadataRoute.Sitemap> {
console.log('id', page);
...
}the console.log shows 2, do you know why this problem is happened in approute?
that works correctly with not found error in dev mode, but that has above bug in production.