-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnext.config.js
90 lines (79 loc) · 1.81 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
// next.config.js
const nextConfig = {
// swcMinify: true,
// excludeDefaultMomentLocales: false,
eslint: {
dirs: ['src'], // Only run ESLint on the 'pages' and 'utils' directories during production builds (next build)
},
env: {
MODE: process.env.MODE,
APP_SECRET: process.env.APP_SECRET,
},
compress: true,
images: {
domains: [
'seller.estatedekho.com',
'estatedekho.com',
'beta.estatedekho.com',
'estatedekho.s3.ap-south-1.amazonaws.com',
],
},
async redirects() {
return [
{
source: '/property-details/:id',
destination: '/property-details/:id',
permanent: true,
},
{
source: '/articles/:name/:id',
destination: '/blog/articles?name=:name&id=:id',
permanent: true,
},
{
source: '/articles:path*',
destination: '/blog/articles?:path*',
permanent: true,
},
];
},
webpack(config, { isServer }) {
if (isServer && process.env.MODE === 'prod') {
require('./scripts/generate-sitemap');
}
return config;
},
};
module.exports = {
async rewrites(){
return [
{
source: '/PropertyListing/slug',
destination:'/PropertyListing/slug'
},
// {
// source: '/PropertyDetails',
// destination:'/PropertyDetails'
// },
{
source: '/blog/blogDetails',
destination:'/blog/blogDetails'
},
{
source: '/DeveloperDetails/DeveloperDetail',
destination:'/DeveloperDetails/DeveloperDetail'
},
{
source: '/Landing-page/slug',
destination:'/Landing-page/slug'
}
]
},
experimental: {
images: {
unoptimized: false,
},
},
};
const optimizedImagesConfig = {};
module.exports = nextConfig;