-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathnext.config.js
117 lines (113 loc) · 3.19 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
/** @type {import('next').NextConfig} */
const { redirects } = require('./redirects.config.js')
const { withPlausibleProxy } = require('next-plausible')
const withBundleAnalyzer = require('@next/bundle-analyzer')({
enabled: process.env.ANALYZE === 'true',
})
const nextConfig = {
bundlePagesRouterDependencies: true,
transpilePackages: ['next-mdx-remote'],
experimental: {
optimizePackageImports: [
'react-lottie-player',
'react-dom',
'react-select',
'framer-motion',
'@sendgrid/mail',
'sharp',
'busboy',
'react-ga4',
'embla-carousel-react',
'react-hook-form',
'yup',
'dayjs',
'remark-gfm',
'react-player',
'swr',
],
},
async headers() {
return [
{
source: '/(.*)',
headers: [
{
key: 'X-Frame-Options',
value: 'DENY',
},
{
key: 'X-Content-Type-Options',
value: 'nosniff',
},
{
key: 'Referrer-Policy',
value: 'strict-origin-when-cross-origin',
},
{
key: 'X-XSS-Protection',
value: '1; mode=block',
},
{
key: 'Strict-Transport-Security',
value: 'max-age=31536000',
},
{
key: 'X-DNS-Prefetch-Control',
value: 'on',
},
],
},
]
},
compress: true,
images: {
minimumCacheTTL: 31536000,
formats: ['image/avif', 'image/webp'],
dangerouslyAllowSVG: true,
remotePatterns: [
{ protocol: 'https', hostname: '**.chec.io' },
{ protocol: 'https', hostname: '**.pixelbakery.com' },
{ protocol: 'https', hostname: 's3.us-east-2.amazonaws.com' },
{
protocol: 'https',
hostname: 's3.us-east-2.amazonaws.com',
pathname: '/cdn.pixelbakery.com/',
},
{ protocol: 'https', hostname: 'cdn.pixelbakery.com.s3.us-east-2.amazonaws.com/' },
{ protocol: 'https', hostname: 'placeimg.com' },
{ protocol: 'https', hostname: 'scontent.cdninstagram.com' },
{ protocol: 'https', hostname: 'scontent-ort2-2.cdninstagram.com' },
{ protocol: 'https', hostname: '*.cdninstagram.com' },
{ protocol: 'https', hostname: 'scontent-akl1-1.cdninstagram.com' },
{ protocol: 'https', hostname: 'i.scdn.co' },
{ protocol: 'https', hostname: '*.scdn.co' },
{
protocol: 'https',
hostname: 'cdn.pixelbakery.com',
},
{ protocol: 'https', hostname: 'scdn.co' },
{
protocol: 'https',
hostname: 's3.amazonaws.com',
},
{ protocol: 'https', hostname: 'mosaic.scdn.co' },
{ protocol: 'https', hostname: 'images234-focus-opensocial.googleusercontent.com' },
{ protocol: 'https', hostname: 'scontent.cdninstagram.com' },
{ protocol: 'https', hostname: 'scontent-akl1-1.cdninstagram.com' },
],
},
trailingSlash: false,
reactStrictMode: false,
eslint: {
ignoreDuringBuilds: true,
},
typescript: {
ignoreBuildErrors: true,
},
redirects,
}
module.exports = withBundleAnalyzer(
withPlausibleProxy({
customDomain: 'https://analytics.jordy.world',
})(nextConfig),
)