Skip to content

Commit

Permalink
- try ISR one more time
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonbahl committed Jan 12, 2024
1 parent 0f718b6 commit 34691b5
Showing 1 changed file with 21 additions and 5 deletions.
26 changes: 21 additions & 5 deletions next.config.mjs
Original file line number Diff line number Diff line change
@@ -1,17 +1,33 @@
import { withFaust, getWpHostname } from '@faustwp/core';
import withMarkdoc from '@markdoc/next.js'
import withSearch from './markdoc/search.mjs'
import atlasCacheHandler from './.atlas/atlas-cache-handler.js'

function experimentalConfig() {

const experimental = {
scrollRestoration: true,
}

if (process.env.ATLAS_CACHE_HANDLER_ENABLED !== undefined) {
const atlasExperimentalOptions = { ...experimental, ...{
incrementalCacheHandlerPath: atlasCacheHandler,
isrMemoryCacheSize: 0
}}
return atlasExperimentalOptions
}

return experimental
}

const nextConfig = {
reactStrictMode: true,
pageExtensions: ['js', 'jsx', 'ts', 'tsx', 'mdx'],
experimental: {
scrollRestoration: true,
},
experimental: experimentalConfig(),
trailingSlash: true,
images: {
domains: [getWpHostname()],
},
};

export default withFaust( withSearch( withMarkdoc({ schemaPath: './src/markdoc' })(nextConfig) ) );
export default withFaust( withSearch( withMarkdoc({ schemaPath: './src/markdoc' })(nextConfig) ) );

0 comments on commit 34691b5

Please sign in to comment.