Skip to content

refactor: upgrade Next.js 15.5 to 16.2 with next-intl v4#17898

Merged
pettinarip merged 5 commits into
devfrom
refactor/nextjs-16-upgrade
Apr 2, 2026
Merged

refactor: upgrade Next.js 15.5 to 16.2 with next-intl v4#17898
pettinarip merged 5 commits into
devfrom
refactor/nextjs-16-upgrade

Conversation

@pettinarip
Copy link
Copy Markdown
Member

@pettinarip pettinarip commented Mar 30, 2026

Summary

  • Upgrade Next.js from 15.5.14 to 16.2.1
  • Upgrade next-intl from v3 to v4.8.3
  • Upgrade @sentry/nextjs to 10.46.0, @next/bundle-analyzer to 16.2.1
  • Rename middleware.tsproxy.ts (Next.js 16 convention)
  • Add Turbopack loader rules alongside existing webpack config
  • Update lint scripts from next lint to eslint . (next lint removed in v16)

Key decisions

  • Webpack stays default for both dev and build — Turbopack has Tailwind CSS selector parsing issues that need a Tailwind upgrade to resolve. Turbopack rules are configured and available via dev:turbo / build:turbo
  • ESLint 8 kept — the ESLint 9 + flat config migration is deferred to a follow-up PR to reduce blast radius

Test plan

  • npx tsc --noEmit passes (no new errors)
  • pnpm build (webpack) succeeds
  • pnpm dev (webpack) starts cleanly
  • Lint-staged hooks pass on commit
  • Netlify deploy preview builds and serves pages correctly
  • Static content pages don't 404 (ISR avoidance preserved)
  • Locale switching works across all routes
  • pnpm build-storybook succeeds Known issue: @storybook/nextjs@8.6 does not support Next.js 16 (next/config was removed). Requires Storybook 10.3+ upgrade — tracked in follow-up PR.

Follow-up PRs

  • ESLint 9 + flat config migration
  • Turbopack as default bundler (after Tailwind upgrade)
  • Storybook 10 upgrade (@storybook/nextjs@8.610.3+ for Next.js 16 compat)
  • cacheComponents / PPR adoption (after crypto.randomUUID() investigation)

@netlify
Copy link
Copy Markdown

netlify Bot commented Mar 30, 2026

Deploy Preview for ethereumorg ready!

Name Link
🔨 Latest commit e590612
🔍 Latest deploy log https://app.netlify.com/projects/ethereumorg/deploys/69ce584ce983ac000878ffb3
😎 Deploy Preview https://deploy-preview-17898.ethereum.it
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
7 paths audited
Performance: 50 (🔴 down 5 from production)
Accessibility: 94 (no change from production)
Best Practices: 100 (no change from production)
SEO: 98 (🔴 down 1 from production)
PWA: 59 (no change from production)
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions github-actions Bot added config ⚙️ Changes to configuration files dependencies 📦 Changes related to project dependencies tooling 🔧 Changes related to tooling of the project labels Mar 30, 2026
@pettinarip pettinarip force-pushed the refactor/nextjs-16-upgrade branch 3 times, most recently from a7a45d5 to 9d8d420 Compare March 30, 2026 15:25
…k config

- Bump next to ^16.2.1, @sentry/nextjs to ^10.46.0, @next/bundle-analyzer to ^16.2.1
- Bump next-intl from v3 to v4.8.3
- Rename middleware.ts to proxy.ts with export renamed to proxy
- Migrate unstable_cache to "use cache" directive with stable cacheLife/cacheTag
- Replace export const revalidate in API routes with "use cache" + cacheLife()
- Enable experimental.useCache (cacheComponents deferred — requires PPR adoption)
- Fix next-intl v4 getTranslations API: add locale param or use string form
- Fix useTranslation hook type incompatibility with v4 Translator type
- Replace localeDetection: false with localeCookie: false
- Update .lintstagedrc.js and lint scripts from next lint to eslint
- Update Sentry ignoreTransactions from middleware to proxy
- Remove automaticVercelMonitors (Vercel-only)
- Add turbopack.rules for YAML, SVG, MD, MP3 loaders
- Add serverExternalPackages for WalletConnect deps
- Dev and build use --webpack (Turbopack blocked by Tailwind CSS compat)
@pettinarip pettinarip force-pushed the refactor/nextjs-16-upgrade branch from 9d8d420 to 291db4e Compare March 30, 2026 15:42
Comment thread src/i18n/routing.ts
Comment thread package.json
Comment thread next.config.js
Comment thread src/components/Hero/HomeHero/index.tsx Outdated
Comment thread next.config.js
@pettinarip pettinarip marked this pull request as ready for review March 31, 2026 13:20
@pettinarip pettinarip requested a review from minimalsm as a code owner March 31, 2026 13:20
Copy link
Copy Markdown
Member

@wackerow wackerow 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! Couple notes, no blockers

Comment thread next.config.js
Comment thread package.json Outdated
@pettinarip pettinarip merged commit 0b75d81 into dev Apr 2, 2026
9 of 10 checks passed
@pettinarip pettinarip deleted the refactor/nextjs-16-upgrade branch April 2, 2026 11:52
@pettinarip pettinarip mentioned this pull request Apr 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

config ⚙️ Changes to configuration files dependencies 📦 Changes related to project dependencies tooling 🔧 Changes related to tooling of the project

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants