saleor-apps-redis_apl/apps/emails-and-messages/next.config.js
Lukasz Ostrowski ec68ed53a3
Sentry improvements (#652)
* Update Sentry in CMS

update turbo

Add test logs for cms

test sentry

Update sentry config and next config

* resolve conflict

* Add changesets

* Remove test code
2023-06-20 10:06:18 +02:00

28 lines
774 B
JavaScript

const { withSentryConfig } = require("@sentry/nextjs");
const isSentryPropertiesInEnvironment =
process.env.SENTRY_AUTH_TOKEN && process.env.SENTRY_PROJECT && process.env.SENTRY_ORG;
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
transpilePackages: ["@saleor/apps-shared", "@saleor/apps-ui", "@saleor/react-hook-form-macaw"],
};
const configWithSentry = withSentryConfig(
nextConfig,
{
silent: true,
org: process.env.SENTRY_ORG,
project: process.env.SENTRY_PROJECT,
},
{
widenClientFileUpload: true,
transpileClientSDK: true,
tunnelRoute: "/monitoring",
hideSourceMaps: true,
disableLogger: true,
}
);
module.exports = isSentryPropertiesInEnvironment ? configWithSentry : nextConfig;