chore: setup payload 3 + next 16 foundation with ipal-kit
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
import { postgresAdapter } from '@payloadcms/db-postgres'
|
||||
import { mcpPlugin } from '@payloadcms/plugin-mcp'
|
||||
import { ipalKit } from '@intecion/ipal-kit'
|
||||
import { lexicalEditor } from '@payloadcms/richtext-lexical'
|
||||
import path from 'path'
|
||||
import { buildConfig } from 'payload'
|
||||
import { fileURLToPath } from 'url'
|
||||
import sharp from 'sharp'
|
||||
|
||||
import { Users } from './collections/Users'
|
||||
import { Media } from './collections/Media'
|
||||
import { Pages } from './collections/Pages'
|
||||
import { Company } from './globals/Company'
|
||||
import { i18n } from './i18n.config'
|
||||
|
||||
const filename = fileURLToPath(import.meta.url)
|
||||
const dirname = path.dirname(filename)
|
||||
|
||||
export default buildConfig({
|
||||
admin: {
|
||||
user: Users.slug,
|
||||
importMap: {
|
||||
baseDir: path.resolve(dirname),
|
||||
},
|
||||
},
|
||||
collections: [Users, Media, Pages],
|
||||
globals: [Company],
|
||||
editor: lexicalEditor(),
|
||||
secret: process.env.PAYLOAD_SECRET || '',
|
||||
typescript: {
|
||||
outputFile: path.resolve(dirname, 'payload-types.ts'),
|
||||
},
|
||||
db: postgresAdapter({
|
||||
pool: {
|
||||
connectionString: process.env.DATABASE_URL || '',
|
||||
},
|
||||
}),
|
||||
sharp,
|
||||
localization: {
|
||||
locales: i18n.locales.map(l => l.code),
|
||||
fallback: true,
|
||||
defaultLocale: i18n.defaultLocale,
|
||||
},
|
||||
plugins: [mcpPlugin({}), ipalKit({ i18n })],
|
||||
})
|
||||
Reference in New Issue
Block a user