-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathnext.config.mjs
95 lines (92 loc) · 2.06 KB
/
next.config.mjs
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
import "./env.mjs"
import withPWA from "next-pwa"
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
images: {
remotePatterns: [
{
protocol: 'https',
hostname: 'avatars.githubusercontent.com',
pathname: '/**',
},
{
protocol: 'https',
hostname: 'app.aave.com',
pathname: '/**',
},
{
protocol: 'https',
hostname: 'images.unsplash.com',
pathname: '/**',
},
{
protocol: 'https',
hostname: 'cloudflare-ipfs.com',
pathname: '/**',
},
{
protocol: 'https',
hostname: 'gateway.ipfs.io',
pathname: '/**',
},
{
protocol: 'https',
hostname: 'avatars.jakerunzer.com',
pathname: '/**',
},
{
protocol: 'https',
hostname: 'icons.llamao.fi',
pathname: '/**',
},
{
protocol: 'https',
hostname: 'cryptologos.cc',
pathname: '/**',
},
{
protocol: 'https',
hostname: 'i.redd.it',
pathname: '/**',
},
],
},
env: {
mode: process.env.NODE_ENV,
SENDGRID_API_KEY: process.env.SENDGRID_API_KEY,
SENDGRID_FROM_EMAIL: process.env.SENDGRID_FROM_EMAIL,
},
webpack: (config) => {
config.resolve.fallback = { fs: false, net: false, tls: false }
config.module.rules.push({
test: /\.svg$/i,
issuer: /\.[jt]sx?$/,
resourceQuery: /icon/,
use: ["@svgr/webpack"],
})
config.module.rules.push({
test: /\.svg$/i,
issuer: /\.[jt]sx?$/,
resourceQuery: { not: [/icon/] },
loader: "next-image-loader",
options: { assetPrefix: "" },
})
return config
},
...(process.env.NODE_ENV === 'production' && {
typescript: {
ignoreBuildErrors: true,
},
eslint: {
ignoreDuringBuilds: true,
},
}),
...withPWA({
dest: "public",
register: true,
skipWaiting: true,
disable: process.env.NODE_ENV === "development",
}),
}
export default nextConfig