-
Notifications
You must be signed in to change notification settings - Fork 0
/
next.config.js
48 lines (42 loc) · 1.06 KB
/
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/** @type {import('next').NextConfig} */
const { withSentryConfig } = require("@sentry/nextjs");
const { createVanillaExtractPlugin } = require("@vanilla-extract/next-plugin");
const nextConfig = {
images: {
domains: [
"www.notion.so",
"s3-us-west-2.amazonaws.com",
"prod-files-secure.s3.us-west-2.amazonaws.com",
],
},
};
const withVanillaExtract = createVanillaExtractPlugin();
const configs = [[withVanillaExtract]];
const useSentry =
process.env.SENTRY_ORG &&
process.env.SENTRY_PROJECT &&
process.env.SENTRY_AUTH_TOKEN &&
process.env.SENTRY_DSN;
if (useSentry) {
// sentry config
configs.push([
withSentryConfig,
{
silent: true,
org: process.env.SENTRY_ORG,
project: process.env.SENTRY_PROJECT,
},
{
widenClientFileUpload: true,
transpileClientSDK: true,
tunnelRoute: "/monitoring",
hideSourceMaps: true,
disableLogger: true,
automaticVercelMonitors: true,
},
]);
}
module.exports = configs.reduce(
(acc, [fn, ...args]) => fn(acc, ...args),
nextConfig,
);