mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-06-07 07:26:46 +00:00
game 主题支持PWA
This commit is contained in:
@@ -96,19 +96,27 @@ module.exports = withBundleAnalyzer({
|
||||
if (!isServer) {
|
||||
console.log('[加载主题]', path.resolve(__dirname, 'themes', THEME))
|
||||
}
|
||||
config.resolve.alias['@theme-components'] = path.resolve(__dirname, 'themes', THEME)
|
||||
config.resolve.alias['@theme-components'] = path.resolve(
|
||||
__dirname,
|
||||
'themes',
|
||||
THEME
|
||||
)
|
||||
return config
|
||||
},
|
||||
experimental: {
|
||||
scrollRestoration: true
|
||||
},
|
||||
exportPathMap: async function (defaultPathMap, { dev, dir, outDir, distDir, buildId }) {
|
||||
// 导出时 忽略/pages/sitemap.xml.js , 否则报错getServerSideProps
|
||||
exportPathMap: async function (
|
||||
defaultPathMap,
|
||||
{ dev, dir, outDir, distDir, buildId }
|
||||
) {
|
||||
// export 静态导出时 忽略/pages/sitemap.xml.js , 否则和getServerSideProps这个动态文件冲突
|
||||
const pages = { ...defaultPathMap }
|
||||
delete pages['/sitemap.xml']
|
||||
return pages
|
||||
},
|
||||
publicRuntimeConfig: { // 这里的配置既可以服务端获取到,也可以在浏览器端获取到
|
||||
publicRuntimeConfig: {
|
||||
// 这里的配置既可以服务端获取到,也可以在浏览器端获取到
|
||||
NODE_ENV_API: process.env.NODE_ENV_API || 'prod',
|
||||
THEMES: themes
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user