-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnext.config.js
45 lines (44 loc) · 1.27 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
/* eslint-disable @typescript-eslint/no-var-requires */
const { i18n } = require('./next-i18next.config');
const { withSentryConfig } = require('@sentry/nextjs');
module.exports = withSentryConfig({
reactStrictMode: true,
swcMinify: true,
compiler: {
styledComponents: true,
},
images: {
domains: [ // FIXME: Add images domains
'cdn.your-domain.com'
],
deviceSizes: [640, 750, 828, 1080, 1200, 1920],
},
i18n,
webpack: (config) => {
config.module.rules.push({
test: /\.svg$/i,
issuer: /\.[jt]sx?$/,
use: [{ loader: '@svgr/webpack', options: { svgo: false } }],
});
return config;
},
async redirects() {
return [
{
source: '/index.html',
destination: '/',
permanent: true,
},
// FIXME: Apply your app domain to implement www to non-www redirect (SEO)
// {
// source: '/:path*',
// has: [{ type: 'host', value: 'www.your-domain.com' }],
// destination: 'https://your-domain/:path*',
// permanent: true,
// },
];
},
sentry: {
hideSourceMaps: true,
},
});