fix(templates): vercel website template payload config regression (#9455)
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
// storage-adapter-import-placeholder
|
import { vercelBlobStorage } from '@payloadcms/storage-vercel-blob'
|
||||||
import { mongooseAdapter } from '@payloadcms/db-mongodb' // database-adapter-import
|
import { vercelPostgresAdapter } from '@payloadcms/db-vercel-postgres'
|
||||||
|
|
||||||
import sharp from 'sharp' // sharp-import
|
import sharp from 'sharp' // sharp-import
|
||||||
import path from 'path'
|
import path from 'path'
|
||||||
@@ -59,17 +59,22 @@ export default buildConfig({
|
|||||||
},
|
},
|
||||||
// This config helps us configure global or default features that the other editors can inherit
|
// This config helps us configure global or default features that the other editors can inherit
|
||||||
editor: defaultLexical,
|
editor: defaultLexical,
|
||||||
// database-adapter-config-start
|
db: vercelPostgresAdapter({
|
||||||
db: mongooseAdapter({
|
pool: {
|
||||||
url: process.env.DATABASE_URI,
|
connectionString: process.env.POSTGRES_URL || '',
|
||||||
|
},
|
||||||
}),
|
}),
|
||||||
// database-adapter-config-end
|
|
||||||
collections: [Pages, Posts, Media, Categories, Users],
|
collections: [Pages, Posts, Media, Categories, Users],
|
||||||
cors: [getServerSideURL()].filter(Boolean),
|
cors: [getServerSideURL()].filter(Boolean),
|
||||||
globals: [Header, Footer],
|
globals: [Header, Footer],
|
||||||
plugins: [
|
plugins: [
|
||||||
...plugins,
|
...plugins,
|
||||||
// storage-adapter-placeholder
|
vercelBlobStorage({
|
||||||
|
collections: {
|
||||||
|
media: true,
|
||||||
|
},
|
||||||
|
token: process.env.BLOB_READ_WRITE_TOKEN || '',
|
||||||
|
}),
|
||||||
],
|
],
|
||||||
secret: process.env.PAYLOAD_SECRET,
|
secret: process.env.PAYLOAD_SECRET,
|
||||||
sharp,
|
sharp,
|
||||||
|
|||||||
Reference in New Issue
Block a user