-
Notifications
You must be signed in to change notification settings - Fork 32
/
next.config.js
57 lines (55 loc) · 1.32 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
/** @type {import('next').NextConfig} */
const nextConfig = {
webpack: (config) => {
config.resolve.fallback = {
fs: false,
buffer: require.resolve('buffer'),
crypto: require.resolve('crypto-browserify'),
path: require.resolve('path-browserify'),
stream: require.resolve('stream-browserify'),
process: require.resolve('process/browser'),
};
return config;
},
reactStrictMode: true,
async rewrites() {
if (!process.env.MULTIVERSX_PRIVATE_API) {
return [];
}
return [
{
source: `${process.env.NEXT_PUBLIC_MULTIVERSX_API}/:path*`,
destination: `${process.env.MULTIVERSX_CUSTOM_API}/:path*`,
destination: `${process.env.MULTIVERSX_PRIVATE_API}/:path*`,
},
];
},
eslint: {
dirs: ['components', 'config', 'hooks', 'pages', 'store', 'types', 'utils'],
},
images: {
remotePatterns: [
{
protocol: 'https',
hostname: '**.elrond.com',
port: '',
},
{
protocol: 'https',
hostname: '**.multiversx.com',
port: '',
},
{
protocol: 'https',
hostname: '**.nftstorage.link',
port: '',
},
{
protocol: 'https',
hostname: 'nftstorage.link',
port: '',
},
],
},
};
module.exports = nextConfig;