From 712ebb42700cd418bb2642858493f57cf7825a40 Mon Sep 17 00:00:00 2001 From: Scott Agirs Date: Mon, 25 Sep 2023 03:06:09 +0300 Subject: [PATCH] chore(next.config): ScottAgirs: remove deprecated `appDir` flag (#8824) Co-authored-by: Daniel Cousens <413395+dcousens@users.noreply.github.com> --- .changeset/strong-swans-destroy.md | 5 +++++ examples/framework-nextjs-app-directory/next.config.mjs | 2 -- packages/core/src/admin-ui/templates/next-config.ts | 3 --- 3 files changed, 5 insertions(+), 5 deletions(-) create mode 100644 .changeset/strong-swans-destroy.md diff --git a/.changeset/strong-swans-destroy.md b/.changeset/strong-swans-destroy.md new file mode 100644 index 00000000000..7c1d6e9dd4a --- /dev/null +++ b/.changeset/strong-swans-destroy.md @@ -0,0 +1,5 @@ +--- +'@keystone-6/core': patch +--- + +Removed deprecated `experimental.appDir` flag from generated next.config diff --git a/examples/framework-nextjs-app-directory/next.config.mjs b/examples/framework-nextjs-app-directory/next.config.mjs index dd8cf90130b..019deb86881 100644 --- a/examples/framework-nextjs-app-directory/next.config.mjs +++ b/examples/framework-nextjs-app-directory/next.config.mjs @@ -3,8 +3,6 @@ import withPreconstruct from '@preconstruct/next'; export default withPreconstruct({ experimental: { - appDir: true, - // without this, 'Error: Expected Upload to be a GraphQL nullable type.' serverComponentsExternalPackages: ['graphql'], }, diff --git a/packages/core/src/admin-ui/templates/next-config.ts b/packages/core/src/admin-ui/templates/next-config.ts index 54a6148e0c8..04cc72ce125 100644 --- a/packages/core/src/admin-ui/templates/next-config.ts +++ b/packages/core/src/admin-ui/templates/next-config.ts @@ -6,9 +6,6 @@ export const nextConfigTemplate = (basePath?: string) => eslint: { ignoreDuringBuilds: true, }, - experimental: { - appDir: false, - }, // We use transpilePackages for the custom admin-ui pages in the ./admin folder // as they import ts files into nextjs transpilePackages: ['../../admin'],