Skip to content

Commit

Permalink
feat: update next config for isr beta enablement process
Browse files Browse the repository at this point in the history
  • Loading branch information
daraghlowe committed Mar 1, 2024
1 parent 7b7edbb commit 2120978
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 21 deletions.
28 changes: 7 additions & 21 deletions next.config.mjs
Original file line number Diff line number Diff line change
@@ -1,20 +1,7 @@
import { withFaust, getWpHostname } from '@faustwp/core';
import withMarkdoc from '@markdoc/next.js'
import withSearch from './markdoc/search.mjs'
import { createRequire } from "module";

const require = createRequire(import.meta.url);

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

return { ...config, ...{
incrementalCacheHandlerPath: require.resolve('./.atlas/atlas-cache-handler.js'),
isrMemoryCacheSize: 0,
} };
}
import { withAtlasConfig } from "@wpengine/atlas-next"

const getHeaders = async () => {
return [
Expand All @@ -35,7 +22,6 @@ const nextConfig = {
pageExtensions: ['js', 'jsx', 'ts', 'tsx', 'mdx'],
experimental: {
scrollRestoration: true,
...(await getAtlasCacheHandler()),
},
trailingSlash: true,
images: {
Expand All @@ -45,10 +31,10 @@ const nextConfig = {
};


export default withFaust(
withSearch(
export default withAtlasConfig(withFaust(
withSearch(
withMarkdoc({
schemaPath: './src/markdoc'
})( nextConfig )
)
);
schemaPath: './src/markdoc'
})( nextConfig )
)
));
13 changes: 13 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
"@radix-ui/react-tabs": "^1.0.4",
"@sindresorhus/slugify": "^2.1.1",
"@tailwindcss/typography": "^0.5.8",
"@wpengine/atlas-next": "^1.0.0",
"acorn": "^8.8.1",
"algoliasearch": "^4.14.2",
"allotment": "^1.19.3",
Expand Down

0 comments on commit 2120978

Please sign in to comment.