Skip to content

Commit

Permalink
- revert next.config.mjs to not include Atlas Cache Handler support
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonbahl committed Jan 12, 2024
1 parent 392e075 commit b4a9a76
Showing 1 changed file with 5 additions and 22 deletions.
27 changes: 5 additions & 22 deletions next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,33 +2,16 @@ import { withFaust, getWpHostname } from '@faustwp/core';
import withMarkdoc from '@markdoc/next.js'
import withSearch from './markdoc/search.mjs'

function experimentalConfig() {

const experimental = {
scrollRestoration: true,
}

if (process.env.ATLAS_CACHE_HANDLER_ENABLED !== undefined) {
const atlasExperimentalOptions = { ...experimental, ...{
// instead of require.resolve, use createRequire
// see: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/import.meta/resolve
incrementalCacheHandlerPath: require.resolve( './.atlas/atlas-cache-handler.js' ),
isrMemoryCacheSize: 0
}}
return atlasExperimentalOptions
}

return experimental
}

const nextConfig = {
reactStrictMode: true,
pageExtensions: ['js', 'jsx', 'ts', 'tsx', 'mdx'],
experimental: experimentalConfig(),
experimental: {
scrollRestoration: true,
},
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 b4a9a76

Please sign in to comment.