forked from SmolDapp/smoldapp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
next.config.js
executable file
·76 lines (73 loc) · 2.29 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
/* eslint-disable @typescript-eslint/explicit-function-return-type */
const withPWA = require('next-pwa')({
dest: 'public',
disable: process.env.NODE_ENV !== 'production'
});
const withTM = require('next-transpile-modules')(['@yearn-finance/web-lib'], {resolveSymlinks: false});
const {PHASE_EXPORT} = require('next/constants');
module.exports = (phase) => withTM(withPWA({
assetPrefix: process.env.IPFS_BUILD === 'true' || phase === PHASE_EXPORT ? './' : '/',
images: {
unoptimized: process.env.IPFS_BUILD === 'true' || phase === PHASE_EXPORT,
domains: [
'gib.to',
'rawcdn.githack.com',
'raw.githubusercontent.com',
'ipfs.io',
's3.amazonaws.com',
'1inch.exchange',
'hut34.io',
'www.coingecko.com',
'defiprime.com',
'cdn.furucombo.app',
'gemini.com',
'messari.io',
'ethereum-optimism.github.io',
'tryroll.com',
'logo.assets.tkn.eth.limo',
'umaproject.org',
'cloudflare-ipfs.com'
]
},
redirects() {
return [
// {source: '/', has: [{type: 'host', value: 'disperse.smold.app'}], destination: '/disperse', permanent: true},
// {source: '/', has: [{type: 'host', value: 'migrate.smold.app'}], destination: '/migratooor', permanent: true},
{
source: '/github',
destination: 'https://github.com/SmolDapp/smoldapp',
permanent: true
}
];
},
async rewrites() {
return [
// {source: '/disperse', has: [{type: 'host', value: 'disperse.smold.app'}], destination: '/'},
// {source: '/:path*', has: [{type: 'host', value: 'migrate.smold.app'}], destination: '/'},
{
source: '/js/script.js',
destination: 'https://plausible.io/js/script.js'
},
{
source: '/api/event',
destination: 'https://plausible.io/api/event'
}
];
},
env: {
JSON_RPC_URL: {
1: process.env.RPC_URL_MAINNET,
10: process.env.RPC_URL_OPTIMISM,
137: process.env.RPC_URL_POLYGON,
250: process.env.RPC_URL_FANTOM,
42161: process.env.RPC_URL_ARBITRUM
},
ALCHEMY_KEY: process.env.ALCHEMY_KEY,
ALCHEMY_API_KEY: process.env.ALCHEMY_API_KEY,
INFURA_PROJECT_ID: process.env.INFURA_PROJECT_ID,
OPENSEA_API_KEY: process.env.OPENSEA_API_KEY,
WALLETCONNECT_PROJECT_ID: process.env.WALLETCONNECT_PROJECT_ID,
RECEIVER_ADDRESS: '0x10001192576E8079f12d6695b0948C2F41320040',
DISPERSE_ADDRESS: '0xD152f549545093347A162Dce210e7293f1452150'
}
}));