Skip to content

Commit

Permalink
Merge pull request #66 from daraghlowe/feature/update_next_config_to_…
Browse files Browse the repository at this point in the history
…enable_isr_for_beta

feat: update next config for isr beta enablement process
  • Loading branch information
jasonbahl authored Mar 12, 2024
2 parents 7b7edbb + 42d4167 commit 6558acf
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 22 deletions.
31 changes: 9 additions & 22 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,11 @@ const nextConfig = {
};


export default withFaust(
withSearch(
withMarkdoc({
schemaPath: './src/markdoc'
})( nextConfig )
)
);
export default withAtlasConfig(
withFaust(
withSearch(
withMarkdoc({
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

1 comment on commit 6558acf

@headless-platform-by-wp-engine

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check out the recent updates to your Atlas environment:

App Environment URL Build
acf.wpgraphql.com main https://hb…wered.com ✅ (logs)

Learn more about building on Atlas in our documentation.

Please sign in to comment.