Skip to content

Commit

Permalink
tidy up next.config, removing unrequired options
Browse files Browse the repository at this point in the history
  • Loading branch information
dcousens committed Apr 12, 2023
1 parent 4fdc691 commit a666fe6
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 40 deletions.
4 changes: 1 addition & 3 deletions examples/nextjs-keystone-app-directory/keystone.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,10 @@ import { lists } from './src/keystone/schema';
import { seedDemoData } from './src/keystone/seed';
import type { Context } from '.keystone/types';

// Next.js deploys need absolute path to sqlite db file
const dbFilePath = `${process.cwd()}/keystone.db`;
export default config({
db: {
provider: 'sqlite',
url: `file:${dbFilePath}`,
url: `file:${process.cwd()}/keystone.db`, // next.js requires an absolute path for sqlite
onConnect: async (context: Context) => {
await seedDemoData(context);
},
Expand Down
37 changes: 0 additions & 37 deletions examples/nextjs-keystone-app-directory/next.config.js

This file was deleted.

17 changes: 17 additions & 0 deletions examples/nextjs-keystone-app-directory/next.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// you don't need this if you're building something outside of the Keystone repo
import withPreconstruct from '@preconstruct/next';

export default withPreconstruct({
experimental: {
appDir: true,

// without this, 'Error: Expected Upload to be a GraphQL nullable type.'
serverComponentsExternalPackages: ['graphql'],
},
eslint: {
ignoreDuringBuilds: true,
},
typescript: {
ignoreBuildErrors: true,
},
});

0 comments on commit a666fe6

Please sign in to comment.