-
Notifications
You must be signed in to change notification settings - Fork 11
/
next.config.mjs
65 lines (61 loc) · 1.43 KB
/
next.config.mjs
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
import withBundleAnalyzer from '@next/bundle-analyzer'
const bundleAnalyzer = withBundleAnalyzer({
enabled: process.env.ANALYZE === 'true',
})
/** @type {import('next').NextConfig} */
const nextConfig = {
transpilePackages: ['jotai-devtools'],
eslint: {
ignoreDuringBuilds: true,
dirs: ['pages', 'components', 'lib', 'hooks', 'store', 'types'],
},
reactStrictMode: true,
images: {
remotePatterns: [
{
protocol: 'https',
hostname: '*.coinmarketcap.com',
pathname: '/static/img/coins/**',
},
],
},
webpack(config) {
config.module.rules.push({
test: /\.svg$/i,
issuer: /\.[jt]sx?$/,
use: [{loader: '@svgr/webpack', options: {dimensions: false}}],
})
return config
},
async redirects() {
return [
{
source: '/',
destination: '/khala',
permanent: false,
},
{
source: '/delegate',
destination: '/khala/delegate/vault',
permanent: true,
},
{
source: '/farm',
destination: '/khala/farm/stake-pool',
permanent: true,
},
{
source: '/:root(delegate|farm|vault|stake-pool)/:path*',
destination: '/khala/:root/:path*',
permanent: true,
},
]
},
experimental: {
swcPlugins: [
['@swc-jotai/debug-label', {}],
['@swc-jotai/react-refresh', {}],
],
},
}
export default bundleAnalyzer(nextConfig)