-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathnext.config.js
134 lines (130 loc) · 3.17 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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
const webpack = require('webpack')
/** @type {import('next').NextConfig} */
const nextConfig = {
images: {
remotePatterns: [
{
protocol: 'https',
hostname: 'raw.githubusercontent.com/**',
},
{
protocol: 'https',
hostname: 'arweave.net/**',
},
{
protocol: 'https',
hostname: 'img.fotofolio.xyz/**',
},
{
protocol: 'https',
hostname: 'images.ctfassets.net/**',
},
],
},
reactStrictMode: true,
async redirects() {
return [
{
source: '/:path*',
has: [{ type: 'host', value: 'www.mango.markets' }],
destination: 'https://mango.markets/:path*',
permanent: true,
},
{
source: '/explore',
destination: '/explore/tokens',
// 308 redirect
permanent: true,
},
{
source: '/explore/categories/governanace',
destination: '/explore/categories/governance',
// 308 redirect
permanent: true,
},
{
source: '/explore/categories/perps',
destination: '/explore/categories/derivatives',
// 308 redirect
permanent: true,
},
{
source: '/explore/categories/oracle',
destination: '/explore/categories',
// 308 redirect
permanent: true,
},
{
source: '/explore/categories/tokenized-asset',
destination: '/explore/categories',
// 308 redirect
permanent: true,
},
{
source: '/explore/categories/yield-bearing',
destination: '/explore/categories',
// 308 redirect
permanent: true,
},
{
source: '/explore/categories/options',
destination: '/explore/categories',
// 308 redirect
permanent: true,
},
{
source: '/explore/categories/layer-2',
destination: '/explore/categories',
// 308 redirect
permanent: true,
},
{
source: '/explore/categories/dog-coin',
destination: '/explore/categories',
// 308 redirect
permanent: true,
},
{
source: '/explore/categories/amm',
destination: '/explore/categories',
// 308 redirect
permanent: true,
},
{
source: '/explore/categories/gambling',
destination: '/explore/categories',
// 308 redirect
permanent: true,
},
{
source: '/explore/categories/domains',
destination: '/explore/categories',
// 308 redirect
permanent: true,
},
{
source: '/explore/categories/social',
destination: '/explore/categories',
// 308 redirect
permanent: true,
},
]
},
webpack: (config, opts) => {
if (!opts.isServer) {
// don't resolve 'fs' module on the client to prevent this error on build --> Error: Can't resolve 'fs'
config.resolve.fallback = {
fs: false,
}
}
config.plugins.push(
new webpack.DefinePlugin({
'process.env': {
BUILD_ID: JSON.stringify(opts.buildId),
},
}),
)
return config
},
}
module.exports = nextConfig