forked from blockworks-foundation/mango-v4-reference-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnext.config.js
40 lines (36 loc) · 866 Bytes
/
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
const { i18n } = require('./next-i18next.config')
const webpack = require('webpack')
/** @type {import('next').NextConfig} */
const nextConfig = {
i18n,
images: {
domains: ['raw.githubusercontent.com', 'arweave.net', 'www.dual.finance'],
},
reactStrictMode: true,
async redirects() {
return [
{
source: '/trade',
destination: '/',
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