From 6740261fe845d9f4776366f565d3a40cf89aab2c Mon Sep 17 00:00:00 2001 From: "tangly1024.com" Date: Fri, 28 Jun 2024 17:44:54 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=96=E6=B6=88=E8=87=AA=E5=8A=A8=E6=B8=85?= =?UTF-8?q?=E7=90=86sitemap?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- next.config.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/next.config.js b/next.config.js index 54b30cac..5cdd5e1a 100644 --- a/next.config.js +++ b/next.config.js @@ -33,14 +33,14 @@ const locales = (function () { })() // 编译前执行 -const preBuild = (function () { - // 删除 public/sitemap.xml 文件 ; 否则会和/pages/sitemap.xml.js 冲突。 - const sitemapPath = path.resolve(__dirname, 'public', 'sitemap.xml') - if (fs.existsSync(sitemapPath)) { - fs.unlinkSync(sitemapPath) - console.log('Deleted existing sitemap.xml from public directory') - } -})() +// const preBuild = (function () { +// // 删除 public/sitemap.xml 文件 ; 否则会和/pages/sitemap.xml.js 冲突。 +// const sitemapPath = path.resolve(__dirname, 'public', 'sitemap.xml') +// if (fs.existsSync(sitemapPath)) { +// fs.unlinkSync(sitemapPath) +// console.log('Deleted existing sitemap.xml from public directory') +// } +// })() /** * 扫描指定目录下的文件夹名,用于获取所有主题