-
Notifications
You must be signed in to change notification settings - Fork 0
/
next.config.js
48 lines (44 loc) · 988 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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
// eslint-disable-next-line @typescript-eslint/no-var-requires
const { withSentryConfig } = require("@sentry/nextjs");
const nextConfig = {
...(!!process.env.NEXT_PUBLIC_SENTRY_DSN && {
sentry: {
hideSourceMaps: true,
},
}),
reactStrictMode: false,
swcMinify: true,
compiler: {
styledComponents: true,
},
images: {
remotePatterns: [
{
protocol: "https",
hostname: "pbs.twimg.com",
},
{
protocol: "https",
hostname: "raw.githubusercontent.com",
},
{
protocol: "https",
hostname: "abs.twimg.com",
},
],
},
webpack(config) {
config.module.rules.push({
test: /\.svg$/i,
issuer: /\.[jt]sx?$/,
use: ["@svgr/webpack"],
});
return config;
},
};
const sentryWebpackPluginOptions = {
silent: true,
};
module.exports = !!process.env.NEXT_PUBLIC_SENTRY_DSN
? withSentryConfig(nextConfig, sentryWebpackPluginOptions)
: nextConfig;