Feat: add sentry (#234)
This commit is contained in:
parent
88545184be
commit
431b2fd4a8
5 changed files with 67 additions and 1 deletions
|
|
@ -1,3 +1,5 @@
|
|||
const { withSentryConfig } = require("@sentry/nextjs")
|
||||
|
||||
const withMDX = require('@next/mdx')({
|
||||
extension: /\.mdx?$/,
|
||||
options: {
|
||||
|
|
@ -29,6 +31,7 @@ const nextConfig = {
|
|||
// https://nextjs.org/docs/api-reference/next.config.js/ignoring-typescript-errors
|
||||
ignoreBuildErrors: true,
|
||||
},
|
||||
sentry: {},
|
||||
async redirects() {
|
||||
return [
|
||||
{
|
||||
|
|
@ -40,4 +43,17 @@ const nextConfig = {
|
|||
},
|
||||
}
|
||||
|
||||
module.exports = withMDX(nextConfig)
|
||||
// https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup
|
||||
const sentryWebpackPluginOptions = {
|
||||
org: "perfectworld",
|
||||
project: "javascript-nextjs",
|
||||
silent: true, // Suppresses all logs
|
||||
sourcemaps: {
|
||||
assets: "./**",
|
||||
ignore: ["./node_modules/**"],
|
||||
},
|
||||
|
||||
// https://github.com/getsentry/sentry-webpack-plugin#options.
|
||||
}
|
||||
|
||||
module.exports = withMDX(withSentryConfig(nextConfig, sentryWebpackPluginOptions))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue