-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnext.config.js
36 lines (32 loc) · 997 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
/** @type {import('next').NextConfig} */
const path = require('path')
const isDev = process.env.NODE_ENV === 'development'
// const isDev = true
const nextConfig = {
reactStrictMode: false,
experimental: {
scrollRestoration: true,
},
sassOptions: {
includePaths: [path.join(__dirname, 'styles')],
},
async rewrites() {
return [
{
source: '/api/:path*',
destination: isDev ? `http://49.234.51.249:13884/api/:path*` : `https://api8.inferer.xyz/api/identity/:path*`
},
{
source: '/api/trends/:path*',
// destination: `http://49.234.51.249:8792/api/:path*`
destination: isDev ? `http://49.234.51.249:8792/api/trends/:path*` : `https://api7.inferer.xyz/api/trends/:path*`
},
{
source: '/plugin/:path*',
destination: isDev ? `http://49.234.51.249:8792/plugin/:path*` : `https://api7.inferer.xyz/plugin/:path*`
},
]
},
}
// http://49.234.51.249:8792
module.exports = nextConfig