-
Notifications
You must be signed in to change notification settings - Fork 25
/
Copy pathnext.config.js
executable file
·51 lines (49 loc) · 1.69 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
/* eslint-disable @typescript-eslint/explicit-function-return-type */
const withPWA = require('next-pwa')({
dest: 'public',
disable: process.env.NODE_ENV !== 'production'
});
const {PHASE_EXPORT} = require('next/constants');
module.exports = (phase) => withPWA({
assetPrefix: process.env.IPFS_BUILD === 'true' || phase === PHASE_EXPORT ? './' : '/',
experimental: {
images: {
unoptimized: process.env.IPFS_BUILD === 'true' || phase === PHASE_EXPORT //Exporting image does not support optimization
}
},
i18n: process.env.IPFS_BUILD === 'true' ? null : {
locales: ['en', 'fr', 'es', 'de', 'pt', 'el', 'tr', 'vi', 'zh', 'hi', 'ja', 'id', 'ru'],
defaultLocale: 'en'
},
images: {
domains: [
'rawcdn.githack.com',
'raw.githubusercontent.com'
]
},
env: {
/* 🔵 - Yearn Finance **************************************************
** Config over the RPC
**********************************************************************/
WEB_SOCKET_URL: {
1: process.env.WS_URL_MAINNET,
10: process.env.WS_URL_OPTIMISM,
250: process.env.WS_URL_FANTOM,
42161: process.env.WS_URL_ARBITRUM
},
JSON_RPC_URL: {
1: process.env.RPC_URL_MAINNET,
10: process.env.RPC_URL_OPTIMISM,
250: process.env.RPC_URL_FANTOM,
42161: process.env.RPC_URL_ARBITRUM
},
ALCHEMY_KEY: process.env.ALCHEMY_KEY,
INFURA_KEY: process.env.INFURA_KEY,
/* 🔵 - Yearn Finance **************************************************
** Yearn Watch specific config
**********************************************************************/
YDAEMON_API_URL: 'https://ydaemon.yearn.finance',
META_API_URL: 'https://meta.yearn.finance/api',
META_GITHUB_URL: 'https://github.com/yearn/yearn-meta'
}
});