forked from saleor/apps
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnext.config.js
32 lines (27 loc) · 837 Bytes
/
next.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// @ts-check
import { withSentryConfig } from "@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-otel",
"@saleor/apps-logger",
"@saleor/apps-shared",
"@saleor/apps-ui",
"@saleor/react-hook-form-macaw",
"@saleor/sentry-utils",
],
experimental: {},
};
const configWithSentry = withSentryConfig(nextConfig, {
org: process.env.SENTRY_ORG,
project: process.env.SENTRY_PROJECT,
silent: true,
hideSourceMaps: true,
widenClientFileUpload: true,
disableLogger: true,
tunnelRoute: "/monitoring",
});
export default isSentryPropertiesInEnvironment ? configWithSentry : nextConfig;