integrate sentry for error logging

This commit is contained in:
Amruth Pillai
2022-11-24 11:21:30 +01:00
parent 0672988fff
commit be0b7f20f9
19 changed files with 748 additions and 169 deletions
+11 -1
View File
@@ -1,5 +1,6 @@
const { version } = require('../package.json');
const { i18n } = require('./next-i18next.config');
const { withSentryConfig } = require('@sentry/nextjs');
/** @type {import('next').NextConfig} */
const nextConfig = {
@@ -15,6 +16,10 @@ const nextConfig = {
domains: ['cdn.rxresu.me', 'www.gravatar.com'],
},
sentry: {
hideSourceMaps: true,
},
// Hack to make Tailwind darkMode 'class' strategy with CSS Modules
// Ref: https://github.com/tailwindlabs/tailwindcss/issues/3258#issuecomment-968368156
webpack: (config) => {
@@ -47,4 +52,9 @@ const nextConfig = {
},
};
module.exports = nextConfig;
/** @type {import('@sentry/nextjs').SentryWebpackPluginOptions} */
const sentryConfig = {
silent: true,
};
module.exports = withSentryConfig(nextConfig, sentryConfig);