-
Notifications
You must be signed in to change notification settings - Fork 54
feat(nextjs): Update to NextJS 16.x series #1214
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
heliocastro
commented
Nov 18, 2025
- Migrated middleware to new proxy recommendation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR upgrades the Next.js framework from version 15.5.4 to 16.0.3, along with associated React updates (19.1.0 → 19.2.0) and numerous dependency updates. The primary change is migrating the middleware to follow Next.js 16's new proxy recommendation by renaming the default exported function from middleware to proxy.
Key changes:
- Updated Next.js to 16.0.3 series with React 19.2.0
- Renamed middleware function to
proxyfollowing Next.js 16 conventions - Removed dynamic imports with
ssr: falsein favor of direct static imports - Updated TypeScript configuration for better module resolution
Reviewed Changes
Copilot reviewed 6 out of 9 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tsconfig.json | Updated module system to NodeNext, JSX to react-jsx, disabled allowJs, and reformatted configuration arrays |
| src/proxy.ts | Renamed default export from middleware to proxy, reordered imports, and reformatted arrays/ternaries |
| src/app/[locale]/requests/clearingRequest/detail/[id]/components/ClearingRequestDetail.tsx | Removed dynamic import for ClearingComments, replaced with static import |
| src/app/[locale]/projects/detail/[id]/components/LicenseClearing.tsx | Removed dynamic imports for DependencyNetworkListView and DependencyNetworkTreeView |
| src/app/[locale]/admin/users/components/UserAdministration.tsx | Removed dynamic import for EditSecondaryDepartmentAndRolesModal |
| src/app/[locale]/admin/users/components/EditSecondaryDepartmentsAndRolesModal.tsx | Changed component from arrow function to function declaration |
| global.d.ts | Removed duplicate import statement and trailing newline |
| package.json | Updated Next.js, React, React-DOM, and type definitions to latest versions |
| pnpm-lock.yaml | Dependency lockfile updates for all transitive dependencies |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
Comments suppressed due to low confidence (1)
src/proxy.ts:61
- [nitpick] The function is named
proxybut the file is namedproxy.tsand it serves as Next.js middleware. While this may follow Next.js 16 conventions for proxy middleware, the nameproxyis less descriptive of its actual middleware functionality than the previous name. Consider verifying this naming follows the official Next.js 16 migration guide, or adding a comment explaining the proxy naming convention.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
3fa277f to
a8e64eb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 14 out of 17 changed files in this pull request and generated 9 comments.
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
Comments suppressed due to low confidence (1)
src/proxy.ts:61
- The middleware export function has been renamed from
middlewaretoproxy. This is a breaking change that will cause the Next.js middleware to not be recognized. Next.js specifically looks for a function namedmiddlewareas the default export in files namedmiddleware.tsormiddleware.js.
The function should be exported as middleware, not proxy, to comply with Next.js conventions.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/app/[locale]/admin/users/components/EditSecondaryDepartmentsAndRolesModal.tsx
Show resolved
Hide resolved
|
|
||
|
|
||
| ## Deployment of a test environment | ||
| Before test, a local build with your defined changes in bothe files: |
Copilot
AI
Nov 18, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo: "bothe" should be "both".
| Before test, a local build with your defined changes in bothe files: | |
| Before test, a local build with your defined changes in both files: |
a8e64eb to
a6479c8
Compare
- Migrated middleware to new proxy recommendation Signed-off-by: Helio Chissini de Castro <[email protected]>
a6479c8 to
3d2c0a9
Compare