-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnext.config.js
67 lines (63 loc) · 1.49 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
/**
* @type {import('next').NextConfig}
*/
const {
withSentryConfig,
} = require("@sentry/nextjs/cjs/config/withSentryConfig");
const nextConfig = {
compress: true,
experimental: {
serverActions: true,
},
output: "standalone",
webpack: (config, { webpack }) => {
config.resolve.alias.canvas = false;
config.plugins.push(
new webpack.DefinePlugin({
__SENTRY_DEBUG__: false,
__SENTRY_TRACING__: false,
__RRWEB_EXCLUDE_IFRAME__: true,
__RRWEB_EXCLUDE_SHADOW_DOM__: true,
__SENTRY_EXCLUDE_REPLAY_WORKER__: true,
})
);
config.plugins.push(
new webpack.IgnorePlugin({
resourceRegExp: /test.*\.tsx$/,
})
);
return config;
},
reactStrictMode: true,
compiler: {
removeConsole: true,
styledComponents: true,
},
images: {
dangerouslyAllowSVG: true,
contentDispositionType: "attachment",
contentSecurityPolicy: "default-src 'self'; script-src 'none'; sandbox;",
remotePatterns: [
{
protocol: "https",
hostname: "**",
},
],
formats: ["image/avif", "image/webp"],
},
};
const sentryConfig = {
silent: true,
org: "kim0426-00d4b8e8c",
project: "hj-devlog",
widenClientFileUpload: true,
transpileClientSDK: true,
tunnelRoute: "/monitoring",
hideSourceMaps: true,
disableLogger: true,
};
if (process.env.NODE_ENV === "production") {
module.exports = withSentryConfig(nextConfig, sentryConfig);
} else {
module.exports = nextConfig;
}