40 lines
1.2 KiB
TypeScript
40 lines
1.2 KiB
TypeScript
import { mongooseAdapter } from '@payloadcms/db-mongodb'
|
|
// import { payloadCloud } from '@payloadcms/plugin-cloud'
|
|
import { lexicalEditor } from '@payloadcms/richtext-lexical'
|
|
import path from 'path'
|
|
import { buildConfig } from 'payload/config'
|
|
// import sharp from 'sharp'
|
|
import { fileURLToPath } from 'url'
|
|
|
|
import { Entities } from './collections/Entities'
|
|
import { People } from './collections/People'
|
|
import { Users } from './collections/Users'
|
|
|
|
const filename = fileURLToPath(import.meta.url)
|
|
const dirname = path.dirname(filename)
|
|
|
|
export default buildConfig({
|
|
admin: {
|
|
user: Users.slug,
|
|
},
|
|
collections: [Entities, People, Users],
|
|
editor: lexicalEditor({}),
|
|
// plugins: [payloadCloud()], // TODO: Re-enable when cloud supports 3.0
|
|
db: mongooseAdapter({
|
|
url: process.env.DATABASE_URI || '',
|
|
}),
|
|
secret: process.env.PAYLOAD_SECRET || '',
|
|
typescript: {
|
|
outputFile: path.resolve(dirname, 'payload-types.ts'),
|
|
},
|
|
|
|
// Sharp is now an optional dependency -
|
|
// if you want to resize images, crop, set focal point, etc.
|
|
// make sure to install it and pass it to the config.
|
|
|
|
// This is temporary - we may make an adapter pattern
|
|
// for this before reaching 3.0 stable
|
|
|
|
// sharp,
|
|
})
|