Skip to content

Commit

Permalink
- modify config
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonbahl committed Jan 13, 2024
1 parent 8d4e25d commit c451f26
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import withMarkdoc from '@markdoc/next.js'
import withSearch from './markdoc/search.mjs'

const getAtlasCacheHandler = async ( config = {} ) => {
if (process.env.ATLAS_CACHE_HANDLER_ENABLED === undefined) {
if (process.env.ATLAS_CACHE_HANDLER_ENABLED === undefined || process.env.ATLAS_CACHE_HANDLER_ENABLED !== 'true') {
return config;
}

Expand All @@ -15,13 +15,14 @@ const getAtlasCacheHandler = async ( config = {} ) => {
} };
}

const nextConfig = () => {
const nextConfig = async () => {
return {
reactStrictMode: true,
pageExtensions: ['js', 'jsx', 'ts', 'tsx', 'mdx'],
experimental: getAtlasCacheHandler({
experimental: {
scrollRestoration: true,
}),
...(await getAtlasCacheHandler()),
},
trailingSlash: true,
images: {
domains: [ getWpHostname() ],
Expand Down

0 comments on commit c451f26

Please sign in to comment.