-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnext.config.js
42 lines (40 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
37
38
39
40
41
42
module.exports = {
reactStrictMode: true,
webpack: (config, { buildId, dev, isServer, defaultLoaders, webpack }) => {
// Important: return the modified config
config.module.rules.push({
test: /\.xml$/i,
use: "xml-loader",
});
return config;
},
async redirects() {
return [
{
"source": "/2019/:path*",
"permanent": true,
"destination": "/details/:path*"
},
{
"source": "/2020/:path*",
"permanent": true,
"destination": "/details/:path*"
},
{
"source": "/2021/:path*",
"permanent": true,
"destination": "/details/:path*"
},
{
"source": "/2022/:path*", //"source": "/:year(\\d{4})/:path*",
"permanent": true,
"destination": "/details/:path*"
},
{
"source": "/2023/:path*", //"source": "/:year(\\d{4})/:path*",
"permanent": true,
"destination": "/details/:path*"
},
]
}
};