diff --git a/.gitignore b/.gitignore index cfef2a24..a4f9ac5a 100644 --- a/.gitignore +++ b/.gitignore @@ -48,4 +48,6 @@ next-env.d.ts # Sentry Auth Token .sentryclirc -certificates \ No newline at end of file +certificates +# Sentry Config File +.env.sentry-build-plugin diff --git a/next.config.build.js b/next.config.build.js index 83e78791..b7ac6778 100644 --- a/next.config.build.js +++ b/next.config.build.js @@ -1,4 +1,6 @@ // This config file contains only the necessary next config needed in production +const { withSentryConfig } = require("@sentry/nextjs"); + /** @type {import('next').NextConfig} */ const nextConfig = { experimental: { @@ -24,4 +26,21 @@ const nextConfig = { }, }; -module.exports = nextConfig; +const sentryWebpackPluginOptions = { + org: "ystv", + project: "calendar2023", +}; + +const sentryOptions = { + // Upload additional client files (increases upload size) + widenClientFileUpload: true, + + // Hides source maps from generated client bundles + hideSourceMaps: true, +}; + +module.exports = withSentryConfig( + nextConfig, + sentryWebpackPluginOptions, + sentryOptions, +);