lay the ground work for sentry integration

This commit is contained in:
Amruth Pillai
2022-11-25 11:32:57 +01:00
parent 77c587681b
commit aec78cf875
15 changed files with 461 additions and 5 deletions

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,11 @@ const nextConfig = {
domains: ['cdn.rxresu.me', 'www.gravatar.com'],
},
sentry: {
hideSourceMaps: true,
widenClientFileUpload: 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 +53,10 @@ const nextConfig = {
},
};
module.exports = nextConfig;
/** @type {import('@sentry/nextjs').SentryWebpackPluginOptions} */
const sentryConfig = {
silent: true,
dryRun: process.env.NODE_ENV !== 'production',
};
module.exports = withSentryConfig(nextConfig, sentryConfig);