-
Notifications
You must be signed in to change notification settings - Fork 1
/
next.config.js
119 lines (114 loc) · 3.16 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
const { withSentryConfig } = require('@sentry/nextjs');
const withBundleAnalyzer = require('@next/bundle-analyzer')({
enabled: process.env.ANALYZE === 'true',
});
const sentryWebpackPluginOptions = {
// Additional config options for the Sentry Webpack plugin. Keep in mind that
// the following options are set automatically, and overriding them is not
// recommended:
// release, url, org, project, authToken, configFile, stripPrefix,
// urlPrefix, include, ignore
silent: true, // Suppresses all logs
// For all available options, see:
// https://github.com/getsentry/sentry-webpack-plugin#options.
};
/** @type {import('next').NextConfig} */
const moduleExports = withBundleAnalyzer({
reactStrictMode: true,
compiler: {
styledComponents: true,
},
images: {
remotePatterns: [
{
protocol: 'https',
hostname: '*.s3.us-east-2.amazonaws.com',
},
],
domains: [
'assets.poap.xyz',
'poap.xyz',
'www.poap.xyz',
'github.com',
'githubusercontent.com',
'avatars.githubusercontent.com',
'lh3.googleusercontent.com',
],
},
eslint: {
ignoreDuringBuilds: true,
},
sentry: {
hideSourceMaps: true,
},
async redirects() {
return [
{
source: '/discord',
destination: 'https://discord.gg/qa3mfPvjWm',
permanent: false,
basePath: false,
},
{
source: '/issues',
destination: 'https://2jxwpvhqb4y.typeform.com/to/VNXmuNQG',
permanent: false,
basePath: false,
},
{
source: '/launch-party',
destination:
'https://medium.com/gitpoap/gitpoap-launch-poap-art-painting-party-224faf0a7667',
permanent: false,
basePath: false,
},
{
source: '/twitter',
destination: 'https://twitter.com/gitpoap',
permanent: false,
basePath: false,
},
{
source: '/devcon-raffle',
destination: 'https://poap.fun/raffle/1786',
permanent: false,
basePath: false,
},
{
source: '/custom-gitpoaps',
destination: 'https://medium.com/gitpoap/introducing-custom-gitpoaps-64bbe4204511',
permanent: false,
basePath: false,
},
{
source: '/links/design-guide',
destination:
'https://gitpoap.notion.site/GitPOAP-Design-Guide-Requirements-9a843acfe1c7490bbfcdab2d1a47e8af',
permanent: false,
basePath: false,
},
{
source: '/links/template',
destination:
'https://gitpoap-public.s3.us-east-2.amazonaws.com/design/gitpoap-design-template.zip',
permanent: false,
basePath: false,
},
];
},
webpack: (config, options) => {
if (!options.isServer) {
// don't resolve 'fs' module on the client to prevent this error on build --> Error: Can't resolve 'fs'
config.resolve.fallback = {
fs: false,
stream: false,
os: false,
https: false,
buffer: require.resolve('buffer'),
http: false,
};
}
return config;
},
});
module.exports = withSentryConfig(moduleExports, sentryWebpackPluginOptions);