BREAKING CHANGE: All plugins have been updated to use named exports and the names have been updated to be consistent.
// before
import { cloudStorage } from '@payloadcms/plugin-cloud-storage'
// current
import { cloudStoragePlugin } from '@payloadcms/plugin-cloud-storage'
//before
import { payloadCloud } from '@payloadcms/plugin-cloud'
// current
import { payloadCloudPlugin } from '@payloadcms/plugin-cloud'
//before
import formBuilder from '@payloadcms/plugin-form-builder'
// current
import { formBuilderPlugin } from '@payloadcms/plugin-form-builder'
//before
import { nestedDocs } from '@payloadcms/plugin-nested-docs'
// current
import { nestedDocsPlugin } from '@payloadcms/plugin-nested-docs'
//before
import { redirects } from '@payloadcms/plugin-redirects'
// current
import { redirectsPlugin } from '@payloadcms/plugin-redirects'
// before
import search from '@payloadcms/plugin-search'
// current
import { searchPlugin } from '@payloadcms/plugin-search'
//before
import { sentry } from '@payloadcms/plugin-sentry'
// current
import { sentryPlugin } from '@payloadcms/plugin-sentry'
// before
import { seo } from '@payloadcms/plugin-seo'
// current
import { seoPlugin } from '@payloadcms/plugin-seo'
41 lines
1009 B
TypeScript
41 lines
1009 B
TypeScript
import { sentryPlugin } from '@payloadcms/plugin-sentry'
|
|
|
|
import { buildConfigWithDefaults } from '../buildConfigWithDefaults.js'
|
|
import { devUser } from '../credentials.js'
|
|
import { Posts } from './collections/Posts.js'
|
|
import { Users } from './collections/Users.js'
|
|
import { testErrors } from './components.js'
|
|
|
|
export default buildConfigWithDefaults({
|
|
admin: {
|
|
components: {
|
|
beforeDashboard: [testErrors],
|
|
},
|
|
user: Users.slug,
|
|
},
|
|
collections: [Posts, Users],
|
|
onInit: async (payload) => {
|
|
await payload.create({
|
|
collection: 'users',
|
|
data: {
|
|
email: devUser.email,
|
|
password: devUser.password,
|
|
},
|
|
})
|
|
},
|
|
plugins: [
|
|
sentryPlugin({
|
|
dsn: 'https://61edebe5ee6d4d38a9d6459c7323d777@o4505289711681536.ingest.sentry.io/4505357688242176',
|
|
options: {
|
|
captureErrors: [400, 403, 404],
|
|
init: {
|
|
debug: true,
|
|
},
|
|
requestHandler: {
|
|
serverName: false,
|
|
},
|
|
},
|
|
}),
|
|
],
|
|
})
|