2023-03-20 09:25:36 +00:00
|
|
|
const { withSentryConfig } = require("@sentry/nextjs");
|
|
|
|
|
|
|
|
const isSentryPropertiesInEnvironment =
|
|
|
|
process.env.SENTRY_AUTH_TOKEN && process.env.SENTRY_PROJECT && process.env.SENTRY_ORG;
|
|
|
|
|
2023-03-16 10:17:00 +00:00
|
|
|
/** @type {import('next').NextConfig} */
|
2023-06-20 08:06:18 +00:00
|
|
|
const nextConfig = {
|
2023-03-16 10:17:00 +00:00
|
|
|
reactStrictMode: true,
|
2023-04-06 10:56:44 +00:00
|
|
|
transpilePackages: ["@saleor/apps-shared"],
|
2023-03-16 10:17:00 +00:00
|
|
|
};
|
2023-03-20 09:25:36 +00:00
|
|
|
|
2023-06-20 08:06:18 +00:00
|
|
|
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;
|