Skip to content

feat(APP-469): upgrade to Next.js 16 with React Compiler and Turbopack#999

Merged
tyhonchik merged 4 commits intomainfrom
app-469-upgrade-nextjs-to-v16
Feb 27, 2026
Merged

feat(APP-469): upgrade to Next.js 16 with React Compiler and Turbopack#999
tyhonchik merged 4 commits intomainfrom
app-469-upgrade-nextjs-to-v16

Conversation

@tyhonchik
Copy link
Copy Markdown
Contributor

@tyhonchik tyhonchik commented Feb 25, 2026

Description

  • Bump Next.js to 16 and other deps
  • Enable React Compiler and Turbopack resolve aliases
  • Replace webpack config with serverExternalPackages and empty browser fallbacks
  • Use next experimental-analyze for build:analyze
  • Rename middleware to proxy and middlewareUtils to proxyUtils

Summary

Upgrade from Next.js 15.5.12 (Webpack) to Next.js 16.1.6 (Turbopack) with React Compiler and deferred AppKit initialization.

What changed:

  • Next.js 15 → 16: Turbopack replaces Webpack as the default production bundler. Build time drops from ~68s to ~19s (3.5x faster), .next output from 3.0 GB to 166 MB (18x smaller), build warnings from 8 to 0
  • React Compiler enabled: babel-plugin-react-compiler provides automatic component memoization at build time
  • Webpack config → Turbopack config: replaced webpack block in next.config.mjs with serverExternalPackages + turbopack.resolveAlias; added src/empty.ts stub for react-native/async-storage browser fallbacks
  • Sentry config updated: disableLoggerbundleSizeOptimizations.excludeDebugStatements (replaces deprecated API)
  • middleware.tsproxy.ts: renamed middleware and its utils to follow Next.js 16 conventions
  • CI/CD simplified: removed shared-build.yml workflow; deployment jobs no longer depend on a separate build step (Vercel handles builds)
  • Deferred AppKit init: moved createAppKit() from module-scope side effect to a lazy ensureAppKit() called from ConnectWalletDialog. Reduces initial JS parse cost on every page — transferred size delta halved from +22% to +10% vs N15

Performance tradeoff (warm Vercel preview, 3 runs × 5 pages):

Metric N15 → N16 Notes
TBT −34% (35 → 23 ms) Less main-thread blocking on every page
LCP +10% (1,781 → 1,961 ms) Light pages improve (Settings −7%), data-heavy regress
FCP +1.4% (flat) Within noise
Transferred +10% Turbopack chunking overhead, partially offset by deferred AppKit
CLS No change Visual stability intact

Full impact analysis: Next.js 15 → 16 Upgrade: Impact Analysis

Type of Change

  • Major: Breaking change (change that would cause existing functionality to not work as expected)
  • Minor: Feature (non-breaking change which adds new functionality)
  • Patch: Enhancement (non-breaking change to an existing feature)
  • Patch: Bug fix (non-breaking change which fixes an issue)

Developer Checklist:

  • Manually smoke tested the functionality in a preview or locally
  • Confirmed there are no new warnings or errors in the browser console
  • (For User Stories only) Double-checked that all Acceptance Criteria are satisfied
  • Confirmed there are no new warnings on automated tests
  • Merged and published any dependent changes in downstream modules
  • Selected the correct base branch
  • Commented the code in hard-to-understand areas
  • Followed the code style guidelines of this project
  • Reviewed that the Files Changed in Github’s UI reflect my intended changes
  • Confirmed the pipeline checks are not failing

Review Checklist:

  • (For User Stories only) Tested in a preview or locally that all Acceptance Criteria are satisfied
  • Confirmed that changes follow the code style guidelines of this project

- Bump Next.js to 16 and other deps
- Enable React Compiler and Turbopack resolve aliases
- Replace webpack config with serverExternalPackages and empty browser fallbacks
- Use next experimental-analyze for build:analyze
- Rename middleware to proxy and middlewareUtils to proxyUtils
@linear
Copy link
Copy Markdown

linear Bot commented Feb 25, 2026

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Feb 25, 2026

🚀 Preview Deployment: View Here

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Feb 25, 2026

E2E Smoke Results

Base URL https://app-next-goepy8f4a-aragon-app.vercel.app
Suite smoke
Result ✅ passed
Run #3741

… multiple workflows

- Deleted the shared build workflow file.
- Updated deployment jobs in app-development, app-preview, app-production, app-rollback, app-staging, and release-pr-deploy workflows to remove dependencies on the build job.
- Adjusted environment variable handling and references for deployments.
@tyhonchik tyhonchik marked this pull request as ready for review February 26, 2026 13:09
@tyhonchik tyhonchik requested a review from a team as a code owner February 26, 2026 13:09
Copy link
Copy Markdown
Contributor

@milosh86 milosh86 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good, left a couple of Qs

Comment thread src/modules/application/components/debugPanel/lazyDebugPanel.tsx Outdated
Comment thread src/modules/application/constants/wagmi.ts
Comment thread next.config.mjs
Copy link
Copy Markdown
Contributor

@milosh86 milosh86 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good 👍

@tyhonchik tyhonchik merged commit e480c59 into main Feb 27, 2026
17 checks passed
@tyhonchik tyhonchik deleted the app-469-upgrade-nextjs-to-v16 branch February 27, 2026 14:53
This was referenced Mar 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants