diff --git a/packages/gatsby-plugin-sitemap/src/gatsby-node.js b/packages/gatsby-plugin-sitemap/src/gatsby-node.js index 3b368eb409814..e7d51a50ae1da 100644 --- a/packages/gatsby-plugin-sitemap/src/gatsby-node.js +++ b/packages/gatsby-plugin-sitemap/src/gatsby-node.js @@ -46,7 +46,7 @@ exports.onPostBuild = async ( basePath, resolveSiteUrl ) - const urls = serialize(filteredRecords) + const urls = await serialize(filteredRecords) if (!rest.sitemapSize || urls.length <= rest.sitemapSize) { const map = sitemap.createSitemap(rest)