25 lines
530 B
TypeScript
25 lines
530 B
TypeScript
import dotenv from 'dotenv'
|
|
import path from 'path'
|
|
|
|
dotenv.config({
|
|
path: path.resolve(__dirname, '../.env'),
|
|
})
|
|
|
|
import { buildConfig } from 'payload/config'
|
|
|
|
import { Pages } from './collections/Pages'
|
|
import BeforeLogin from './components/BeforeLogin'
|
|
|
|
export default buildConfig({
|
|
serverURL: process.env.PAYLOAD_PUBLIC_SERVER_URL || '',
|
|
collections: [Pages],
|
|
admin: {
|
|
components: {
|
|
beforeLogin: [BeforeLogin],
|
|
},
|
|
},
|
|
typescript: {
|
|
outputFile: path.resolve(__dirname, 'payload-types.ts'),
|
|
},
|
|
})
|