Skip to content

Commit acf2675

Browse files
committed
upgrade pages-router to next 15
1 parent 66fa764 commit acf2675

File tree

3 files changed

+100
-225
lines changed

3 files changed

+100
-225
lines changed
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
import type { NextConfig } from "next";
2+
3+
const nextConfig: NextConfig = {
4+
transpilePackages: ["@example/shared"],
5+
i18n: {
6+
locales: ["en", "nl"],
7+
defaultLocale: "en",
8+
},
9+
cleanDistDir: true,
10+
reactStrictMode: true,
11+
output: "standalone",
12+
outputFileTracingRoot: "../sst",
13+
eslint: {
14+
ignoreDuringBuilds: true,
15+
},
16+
headers: async () => [
17+
{
18+
source: "/",
19+
headers: [
20+
{
21+
key: "x-custom-header",
22+
value: "my custom header value",
23+
},
24+
],
25+
},
26+
],
27+
rewrites: async () => [
28+
{ source: "/rewrite", destination: "/", locale: false },
29+
{
30+
source: "/rewriteUsingQuery",
31+
destination: "/:destination/",
32+
locale: false,
33+
has: [
34+
{
35+
type: "query",
36+
key: "d",
37+
value: "(?<destination>\\w+)",
38+
},
39+
],
40+
},
41+
],
42+
redirects: async () => [
43+
{
44+
source: "/next-config-redirect-without-locale-support/",
45+
destination: "https://open-next.js.org/",
46+
permanent: false,
47+
basePath: false,
48+
locale: false,
49+
},
50+
{
51+
source: "/redirect-with-locale/",
52+
destination: "/ssr/",
53+
permanent: false,
54+
},
55+
],
56+
trailingSlash: true,
57+
poweredByHeader: true,
58+
};
59+
60+
export default nextConfig;

examples/pages-router/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@
1313
"dependencies": {
1414
"@example/shared": "workspace:*",
1515
"@types/node": "20.5.0",
16-
"@types/react": "18.2.20",
17-
"@types/react-dom": "18.2.7",
16+
"@types/react": "^18.0.0",
17+
"@types/react-dom": "^18.0.0",
1818
"autoprefixer": "10.4.15",
19-
"next": "^14.0.3",
19+
"next": "15.0.0",
2020
"postcss": "8.4.27",
21-
"react": "latest",
22-
"react-dom": "latest",
21+
"react": "19.0.0-rc-65a56d0e-20241020",
22+
"react-dom": "19.0.0-rc-65a56d0e-20241020",
2323
"tailwindcss": "3.3.3",
2424
"typescript": "^4.9.3"
2525
}

0 commit comments

Comments
 (0)