-
Notifications
You must be signed in to change notification settings - Fork 0
/
next.config.js
54 lines (48 loc) · 1.46 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
/*eslint-disable*/
/** @type {import('next').NextConfig} */
const path = require('path')
const withBundleAnalyzer = require('@next/bundle-analyzer')({
enabled: process.env.ANALYZE === 'true',
})
const { i18n } = require('./next-i18next.config')
const nextConfig = withBundleAnalyzer({
staticPageGenerationTimeout: 300,
compiler: {
styledComponents: true,
},
sassOptions: {
inCludePaths: [path.join(__dirname, 'styles')],
},
poweredByHeader: false,
i18n,
images: {
remotePatterns: [
{
protocol: 'https',
hostname: 'bot-thk.vercel.app',
},
{
protocol: 'https',
hostname: 'res.cloudinary.com',
port: '',
pathname: `/${process.env.NEXT_PUBLIC_CLOUDINARY_NAME}/image/upload/**`
},
{ hostname: 'twitter.com' },
{ hostname: 'localhost' },
{ hostname: '[::1]' },
],
formats: ['image/avif', 'image/webp'],
contentSecurityPolicy:
"default-src 'self'; script-src 'none'; sandbox;",
deviceSizes: [350, 640, 750, 828, 1080, 1200, 1920, 2048, 3840],
minimumCacheTTL: 60
},
swcMinify: true,
webpack: (config, { isServer }) => {
if (isServer) {
; () => import(path.join(__dirname, 'helpers/generate-sitemap'))
}
return config
},
})
module.exports = nextConfig