-
Notifications
You must be signed in to change notification settings - Fork 3
/
next.config.js
89 lines (83 loc) · 2.26 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
// This file sets a custom webpack configuration to use your Next.js app
// with Sentry.
// https://nextjs.org/docs/api-reference/next.config.js/introduction
// https://docs.sentry.io/platforms/javascript/guides/nextjs/
const { withSentryConfig } = require('@sentry/nextjs');
const withPWA = require('next-pwa')({
dest: 'public',
disable: process.env.NODE_ENV === 'development',
});
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.
};
const moduleExports = {
async rewrites() {
return [
{
source: '/merch',
destination: 'https://www.utilityapparel.com/quidditch-uk/',
},
{
source: '/play/coaching-resources',
destination:
'https://docs.google.com/spreadsheets/d/1n_j-gDhC4mE2j4nTkBAhY-8MlvqAX0bLnWm0on54GJA/',
},
];
},
async redirects() {
return [
{
source: '/referees',
destination: '/volunteer/referees',
permanent: true,
},
{
source: '/snitches',
destination: '/volunteer/snitches',
permanent: true,
},
{
source: '/find-quidditch',
destination: '/clubs',
permanent: true,
},
{
source: '/teamuk',
destination: '/programmes/england',
permanent: true,
},
{
source: '/teamuk',
destination: '/programmes/england',
permanent: true,
},
];
},
images: {
domains: [
'images.prismic.io',
'chaser.cdn.prismic.io',
'qs-prod-team-logo.s3.eu-west-2.amazonaws.com',
'qs-staging-team-logo.s3.eu-west-2.amazonaws.com',
'i.ytimg.com',
'files.stripe.com',
],
},
webpack: (config) => {
config.module.rules.push({
test: /\.svg$/,
use: ['@svgr/webpack'],
});
return config;
},
};
module.exports = withPWA(
withSentryConfig(moduleExports, SentryWebpackPluginOptions)
);