chore(plugin-sentry): migrate esm, remove webpack

This commit is contained in:
Elliot DeNolf
2024-03-14 12:14:59 -04:00
parent 415ba26efe
commit e8b47eef2f
3 changed files with 19 additions and 55 deletions

View File

@@ -6,27 +6,13 @@ import { Users } from './collections/Users.js'
import { testErrors } from './components.js'
export default buildConfigWithDefaults({
collections: [Posts, Users],
admin: {
user: Users.slug,
components: {
beforeDashboard: [testErrors],
},
user: Users.slug,
},
plugins: [
sentry({
dsn: 'https://61edebe5ee6d4d38a9d6459c7323d777@o4505289711681536.ingest.sentry.io/4505357688242176',
options: {
init: {
debug: true,
},
requestHandler: {
serverName: false,
},
captureErrors: [400, 403, 404],
},
}),
],
collections: [Posts, Users],
onInit: async (payload) => {
await payload.create({
collection: 'users',
@@ -36,4 +22,18 @@ export default buildConfigWithDefaults({
},
})
},
plugins: [
sentry({
dsn: 'https://61edebe5ee6d4d38a9d6459c7323d777@o4505289711681536.ingest.sentry.io/4505357688242176',
options: {
captureErrors: [400, 403, 404],
init: {
debug: true,
},
requestHandler: {
serverName: false,
},
},
}),
],
})