mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-13 23:16:47 +00:00
静态部署优化
This commit is contained in:
@@ -98,13 +98,12 @@ module.exports = withBundleAnalyzer({
|
||||
experimental: {
|
||||
scrollRestoration: true
|
||||
},
|
||||
// exportPathMap: (defaultPathMap, { dev, dir, outDir, distDir, buildId }) => {
|
||||
// const pathMap = { ...defaultPathMap }
|
||||
// // 忽略/sitemap.xml页面的导出
|
||||
// pathMap['/sitemap.xml'] = { page: false }
|
||||
|
||||
// return pathMap
|
||||
// },
|
||||
exportPathMap: async function (defaultPathMap, { dev, dir, outDir, distDir, buildId }) {
|
||||
// 导出时 忽略/pages/sitemap.xml.js , 否则报错getServerSideProps
|
||||
const pages = { ...defaultPathMap }
|
||||
delete pages['/sitemap.xml']
|
||||
return pages
|
||||
},
|
||||
publicRuntimeConfig: { // 这里的配置既可以服务端获取到,也可以在浏览器端获取到
|
||||
NODE_ENV_API: process.env.NODE_ENV_API || 'prod',
|
||||
THEMES: themes
|
||||
|
||||
Reference in New Issue
Block a user