chore: move payload config into src
This commit is contained in:
@@ -1,12 +1,12 @@
|
|||||||
import { mongooseAdapter } from '@payloadcms/db-mongodb' // database-adapter-import
|
import { mongooseAdapter } from '@payloadcms/db-mongodb' // database-adapter-import
|
||||||
import { payloadCloud } from '@payloadcms/plugin-cloud'
|
// import { payloadCloud } from '@payloadcms/plugin-cloud'
|
||||||
import { lexicalEditor } from '@payloadcms/richtext-lexical' // editor-import
|
import { lexicalEditor } from '@payloadcms/richtext-lexical' // editor-import
|
||||||
import path from 'path'
|
import path from 'path'
|
||||||
import { buildConfig } from 'payload/config'
|
import { buildConfig } from 'payload/config'
|
||||||
import sharp from 'sharp'
|
// import sharp from 'sharp'
|
||||||
import { fileURLToPath } from 'url'
|
import { fileURLToPath } from 'url'
|
||||||
|
|
||||||
import { Users } from './src/collections/Users'
|
import { Users } from './collections/Users'
|
||||||
|
|
||||||
const filename = fileURLToPath(import.meta.url)
|
const filename = fileURLToPath(import.meta.url)
|
||||||
const dirname = path.dirname(filename)
|
const dirname = path.dirname(filename)
|
||||||
@@ -17,7 +17,7 @@ export default buildConfig({
|
|||||||
},
|
},
|
||||||
collections: [Users],
|
collections: [Users],
|
||||||
editor: lexicalEditor({}),
|
editor: lexicalEditor({}),
|
||||||
plugins: [payloadCloud()],
|
// plugins: [payloadCloud()], // TODO: Re-enable when cloud supports 3.0
|
||||||
secret: process.env.PAYLOAD_SECRET || '',
|
secret: process.env.PAYLOAD_SECRET || '',
|
||||||
typescript: {
|
typescript: {
|
||||||
outputFile: path.resolve(dirname, 'payload-types.ts'),
|
outputFile: path.resolve(dirname, 'payload-types.ts'),
|
||||||
@@ -33,5 +33,6 @@ export default buildConfig({
|
|||||||
|
|
||||||
// This is temporary - we may make an adapter pattern
|
// This is temporary - we may make an adapter pattern
|
||||||
// for this before reaching 3.0 stable
|
// for this before reaching 3.0 stable
|
||||||
sharp,
|
|
||||||
|
// sharp,
|
||||||
})
|
})
|
||||||
@@ -20,7 +20,7 @@
|
|||||||
],
|
],
|
||||||
"paths": {
|
"paths": {
|
||||||
"@/*": ["./src/*"],
|
"@/*": ["./src/*"],
|
||||||
"@payload-config": ["./payload.config.ts"]
|
"@payload-config": ["./src/payload.config.ts"]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
|
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
|
||||||
|
|||||||
Reference in New Issue
Block a user