Skip to content

Commit 4ab3c73

Browse files
committed
chore: Fix rewrites bug in next.config.js
This commit fixes a bug in the `next.config.js` file related to rewrites. The rewrites for the `/2024` route were missing, causing incorrect redirection. This commit adds the missing rewrites for the `/2024` route, ensuring proper redirection.
1 parent d38e9d6 commit 4ab3c73

File tree

1 file changed

+28
-22
lines changed

1 file changed

+28
-22
lines changed

apps/2024/next.config.js

Lines changed: 28 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -8,26 +8,32 @@ module.exports = {
88
ignoreBuildErrors: true,
99
},
1010
// fix the rewrites bug
11-
// async rewrites() {
12-
// return [
13-
// {
14-
// source: "/2023/:path*",
15-
// destination: `${process.env.NODE_ENV
16-
// === "development" ? "http://localhost:3002" : "https://ug.pycon.org"
17-
// }/:path*`,
18-
// },
19-
// {
20-
// source: "/2023",
21-
// destination: `${process.env.NODE_ENV
22-
// === "development" ? "http://localhost:3002" : "https://ug.pycon.org"
23-
// }/:path*`,
24-
// },
25-
// {
26-
// source: "/:path*",
27-
// destination: `${process.env.NODE_ENV
28-
// === "development" ? "http://localhost:3001" : "https://ug.pycon.org"
29-
// }/:path*`,
30-
// },
31-
// ];
32-
// },
11+
async rewrites() {
12+
return [
13+
{
14+
source: "/2023/:path*",
15+
destination: `${process.env.NODE_ENV
16+
=== "development" ? "http://localhost:3002" : "https://ug.pycon.org"
17+
}/:path*`,
18+
},
19+
{
20+
source: "/2023",
21+
destination: `${process.env.NODE_ENV
22+
=== "development" ? "http://localhost:3002" : "https://ug.pycon.org"
23+
}/:path*`,
24+
},
25+
{
26+
source: "/2024/:path*",
27+
destination: `${process.env.NODE_ENV
28+
=== "development" ? "http://localhost:3001" : "https://ug.pycon.org"
29+
}/:path*`,
30+
},
31+
{
32+
source: "/:path*",
33+
destination: `${process.env.NODE_ENV
34+
=== "development" ? "http://localhost:3001" : "https://ug.pycon.org"
35+
}/:path*`,
36+
},
37+
];
38+
},
3339
};

0 commit comments

Comments
 (0)