-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathnext.config.js
executable file
·64 lines (60 loc) · 1.41 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
const createNextIntlPlugin = require('next-intl/plugin')
const withNextIntl = createNextIntlPlugin()
/** @type {import('next').NextConfig} */
const nextConfig = {
async redirects() {
return [
{
source: '/',
destination: '/dashboard',
permanent: true,
},
]
},
experimental: {
appDir: true,
},
reactStrictMode: true,
webpack(config) {
config.resolve.fallback = {
fs: false,
net: false,
tls: false,
'react-native': false,
}
config.externals.push('pino-pretty', 'lokijs', 'encoding')
config.optimization.moduleIds = 'named'
config.optimization.runtimeChunk = 'single'
config.module.rules.push({
test: /\.svg$/i,
issuer: /\.[jt]sx?$/,
use: ['@svgr/webpack'],
})
return config
},
images: {
domains: [
'static.debank.com',
'everipedia.org',
'figma.com',
'ipfs.everipedia.org',
'lh3.googleusercontent.com',
'gateway.pinata.cloud',
],
},
async rewrites() {
return [
{
source: '/ingest/static/:path*',
destination: 'https://us-assets.i.posthog.com/static/:path*',
},
{
source: '/ingest/:path*',
destination: 'https://us.i.posthog.com/:path*',
},
]
},
// This is required to support PostHog trailing slash API requests
skipTrailingSlashRedirect: true,
}
module.exports = withNextIntl(nextConfig)