forked from wevm/wagmi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnext.config.js
50 lines (48 loc) · 1.23 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
const withNextra = require('nextra')({
theme: 'nextra-theme-docs',
themeConfig: './theme.config.js',
unstable_contentDump: true,
unstable_flexsearch: true,
unstable_staticImage: true,
})
/** @type {import('next').NextConfig} */
const config = {
i18n: {
locales: ['en-US'],
defaultLocale: 'en-US',
},
reactStrictMode: true,
redirects: () => {
return [
{
source: '/examples',
destination: '/examples/connect-wallet',
statusCode: 302,
},
{
source: '/guides/:path*',
destination: '/examples/:path*',
permanent: true,
},
{
source: '/gitcoin',
destination:
'https://gitcoin.co/grants/4493/wagmi-react-hooks-library-for-ethereum',
permanent: false,
},
]
},
typescript: {
// Disable type checking since eslint handles this
ignoreBuildErrors: true,
},
}
if (process.env.NODE_ENV === 'development') {
const withPreconstruct = require('@preconstruct/next')
module.exports = withPreconstruct(withNextra(config))
} else {
const withBundleAnalyzer = require('@next/bundle-analyzer')({
enabled: process.env.ANALYZE === 'true',
})
module.exports = withBundleAnalyzer(withNextra(config))
}