diff options
author | 2022-02-02 21:27:11 -0800 | |
---|---|---|
committer | 2022-02-02 21:27:11 -0800 | |
commit | 81238bf77d9d2234b23b58b1c770022e4765b3b3 (patch) | |
tree | 2c73976af839f4eeb093479aa40ad928916e8f55 | |
parent | ade996c885e34355b6e6e0343de6f262b25b9604 (diff) | |
download | astro-81238bf77d9d2234b23b58b1c770022e4765b3b3.tar.gz astro-81238bf77d9d2234b23b58b1c770022e4765b3b3.tar.zst astro-81238bf77d9d2234b23b58b1c770022e4765b3b3.zip |
fix(sitemap): remove debug if sitemap disabled (#2514)
-rw-r--r-- | packages/astro/src/core/build/index.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/astro/src/core/build/index.ts b/packages/astro/src/core/build/index.ts index 024dc4d05..014271351 100644 --- a/packages/astro/src/core/build/index.ts +++ b/packages/astro/src/core/build/index.ts @@ -146,14 +146,14 @@ class AstroBuilder { debug('build', timerMessage('Additional assets copied', timer.assetsStart)); // Build your final sitemap. - timer.sitemapStart = performance.now(); if (this.config.buildOptions.sitemap && this.config.buildOptions.site) { + timer.sitemapStart = performance.now(); const sitemap = generateSitemap(pageNames.map((pageName) => new URL(pageName, this.config.buildOptions.site).href)); const sitemapPath = new URL('./sitemap.xml', this.config.dist); await fs.promises.mkdir(new URL('./', sitemapPath), { recursive: true }); await fs.promises.writeFile(sitemapPath, sitemap, 'utf8'); + debug('build', timerMessage('Sitemap built', timer.sitemapStart)); } - debug('build', timerMessage('Sitemap built', timer.sitemapStart)); // You're done! Time to clean up. await viteServer.close(); |