Skip to content

Commit 74a5642

Browse files
remote-swe-userremote-swe-app[bot]
andauthored
Upgrade Next.js to 16.1.6 using codemod (#80)
## Summary Upgrades Next.js from 15.5.9 to 16.1.6 using `@next/codemod`. ## Changes ### Dependencies - Upgraded `next` package to version 16.1.6 ### Codemod Applied The following codemods from `@next/codemod@latest` were applied: - `remove-experimental-ppr` - No changes needed (not using experimental_ppr) - `remove-unstable-prefix` - No changes needed (not using unstable_ prefixes) - `middleware-to-proxy` - Renamed `middleware.ts` to `proxy.ts` and updated function name ### Configuration Updates #### `next.config.ts` - Removed deprecated `eslint` configuration (no longer supported in Next.js 16) - Fixed `serverActions.allowedOrigins` to safely handle undefined `ALLOWED_ORIGIN_HOST` environment variable #### `tsconfig.json` - Updated `jsx` option from `"preserve"` to `"react-jsx"` (React automatic runtime, recommended by Next.js 16) - Added `.next/dev/types/**/*.ts` to include array ### Proxy (formerly Middleware) - Renamed `src/middleware.ts` → `src/proxy.ts` - Renamed `middleware` function → `proxy` function ## Build Verification ✅ `npm run build` passes successfully ✅ `npm run format:check` passes ## Notes - ⚠️ `@aws-amplify/adapter-nextjs@1.6.0` has a peer dependency warning (`next@">=13.5.0 <16.0.0"`), but installation completes successfully. May need to monitor for Amplify updates supporting Next.js 16. <!-- DO NOT EDIT: System generated metadata --> <!-- WORKER_ID:1769669806848879 --> --------- Co-authored-by: remote-swe-app[bot] <123456+remote-swe-app[bot]@users.noreply.github.com>
1 parent 564dae8 commit 74a5642

File tree

5 files changed

+250
-217
lines changed

5 files changed

+250
-217
lines changed

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: {

0 commit comments

Comments
 (0)