Skip to content

Commit fb0cec4

Browse files
author
remote-swe-app[bot]
committed
chore: update config for Next.js 16 compatibility
- Remove deprecated eslint config from next.config.ts - Fix serverActions.allowedOrigins to handle undefined env var - Update tsconfig.json with Next.js 16 recommended settings (jsx: react-jsx) - Format proxy.ts
1 parent a3759bc commit fb0cec4

3 files changed

Lines changed: 26 additions & 10 deletions

File tree

webapp/next.config.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
11
import type { NextConfig } from 'next';
22

3+
const allowedOrigins = ['localhost:3000'];
4+
if (process.env.ALLOWED_ORIGIN_HOST) {
5+
allowedOrigins.push(process.env.ALLOWED_ORIGIN_HOST);
6+
}
7+
38
const nextConfig: NextConfig = {
49
output: 'standalone',
5-
eslint: {
6-
ignoreDuringBuilds: true,
7-
},
810
experimental: {
911
webpackBuildWorker: true,
1012
parallelServerBuildTraces: true,
1113
parallelServerCompiles: true,
1214
serverActions: {
13-
allowedOrigins: ['localhost:3000', process.env.ALLOWED_ORIGIN_HOST!],
15+
allowedOrigins,
1416
},
1517
},
1618
typescript: {

webapp/src/proxy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,5 +36,5 @@ export const config = {
3636
* - favicon.ico (favicon file)
3737
*/
3838
'/((?!api|_next/static|_next/image|favicon.ico|sign-in).*)',
39-
]
39+
],
4040
};

webapp/tsconfig.json

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
{
22
"compilerOptions": {
33
"target": "ES2017",
4-
"lib": ["dom", "dom.iterable", "esnext"],
4+
"lib": [
5+
"dom",
6+
"dom.iterable",
7+
"esnext"
8+
],
59
"allowJs": true,
610
"skipLibCheck": true,
711
"strict": true,
@@ -11,17 +15,27 @@
1115
"moduleResolution": "bundler",
1216
"resolveJsonModule": true,
1317
"isolatedModules": true,
14-
"jsx": "preserve",
18+
"jsx": "react-jsx",
1519
"incremental": true,
1620
"plugins": [
1721
{
1822
"name": "next"
1923
}
2024
],
2125
"paths": {
22-
"@/*": ["./src/*"]
26+
"@/*": [
27+
"./src/*"
28+
]
2329
}
2430
},
25-
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
26-
"exclude": ["node_modules"]
31+
"include": [
32+
"next-env.d.ts",
33+
"**/*.ts",
34+
"**/*.tsx",
35+
".next/types/**/*.ts",
36+
".next/dev/types/**/*.ts"
37+
],
38+
"exclude": [
39+
"node_modules"
40+
]
2741
}

0 commit comments

Comments
 (0)