diff --git a/packages/next-sitemap/src/builders/url-set-builder.ts b/packages/next-sitemap/src/builders/url-set-builder.ts index d870dc41..45d44d36 100644 --- a/packages/next-sitemap/src/builders/url-set-builder.ts +++ b/packages/next-sitemap/src/builders/url-set-builder.ts @@ -74,6 +74,8 @@ export class UrlSetBuilder { ? Object.keys(this.manifest?.preRender?.routes ?? {}) : []), ...(this.manifest?.staticExportPages ?? []), + ...(this.manifest?.routes?.staticRoutes?.map((route) => route?.page) ?? + []), ] // Filter out next.js internal urls and generate urls based on sitemap diff --git a/packages/next-sitemap/src/interface.ts b/packages/next-sitemap/src/interface.ts index 403ad1be..e8e212c6 100644 --- a/packages/next-sitemap/src/interface.ts +++ b/packages/next-sitemap/src/interface.ts @@ -197,6 +197,7 @@ export interface IRoutesManifest { locales: string[] defaultLocale: string } + staticRoutes?: { page: string }[] } export interface IExportMarker {