-
Notifications
You must be signed in to change notification settings - Fork 114
Expand file tree
/
Copy pathnext.config.js
More file actions
76 lines (73 loc) · 1.67 KB
/
next.config.js
File metadata and controls
76 lines (73 loc) · 1.67 KB
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
68
69
70
71
72
73
74
75
76
const withBundleAnalyzer = require('@next/bundle-analyzer')({
enabled: process.env.ANALYZE === 'true',
});
const { withSentryConfig } = require('@sentry/nextjs');
const nextConfig = {
output: 'standalone',
turbopack: {},
async headers() {
return [
{
source: '/(.*)?', // Matches all pages
headers: [
{
key: 'X-Frame-Options',
value: 'DENY',
},
{
key: 'Document-Policy',
value: 'js-profiling',
},
],
},
];
},
async redirects() {
return [
{
source: '/about',
destination: '/',
permanent: true,
},
];
},
experimental: {
optimizePackageImports: ['@chakra-ui/react'],
},
images: {
remotePatterns: [
{
protocol: 'https',
hostname: 'assets.hiro.so',
},
],
},
};
const sentryWebpackPluginOptions = {
org: process.env.SENTRY_ORG,
project: process.env.SENTRY_PROJECT,
silent: !process.env.CI,
widenClientFileUpload: true,
hideSourceMaps: true,
deleteSourceMapsAfterUpload: true,
disableLogger: true,
unstable_sentryWebpackPluginOptions: {
applicationKey: 'stacks-explorer',
},
_experimental: {
turbopackApplicationKey: 'stacks-explorer',
},
release: {
name: process.env.VERCEL_GIT_COMMIT_SHA || process.env.NEXT_PUBLIC_RELEASE_TAG_NAME,
inject: true,
},
setCommits: {
auto: true,
ignoreMissing: true,
},
deploy: {
env: process.env.VERCEL_ENV || process.env.NODE_ENV || 'production',
},
};
// Apply Sentry configuration
module.exports = withSentryConfig(withBundleAnalyzer(nextConfig), sentryWebpackPluginOptions);