feat: migrate to Next.js 15, React 19, and Tailwind CSS 4#3
Open
hellodun wants to merge 8 commits into
Open
Conversation
Upgrade all core dependencies to their latest major versions: - next 13.4.9 → 15.2.0+ - react/react-dom 18.2.0 → 19.0.0+ - tailwindcss 3.3.3 → 4.0.0+ - next-themes 0.2.1 → 0.4.4+ - lucide-react 0.260.0 → 0.474.0+ - eslint 8 → 9, typescript 5.1 → 5.7+ Move type definitions, linting, and build tools to devDependencies. Add @tailwindcss/postcss and @eslint/eslintrc for v4/v9 compatibility. Enable Turbopack in dev script. Remove autoprefixer (built into Tailwind 4). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Replace next.config.js with next.config.ts (typed NextConfig) - Delete tailwind.config.js, move to CSS-first config in globals.css using @import "tailwindcss" and @theme directive for custom colors - Update postcss.config.js to use @tailwindcss/postcss plugin - Replace .eslintrc.json with eslint.config.mjs (ESLint 9 flat config) - Update tsconfig.json: target es5 → es2017, moduleResolution node → bundler Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Tailwind CSS 4 @theme directive produces kebab-case utility names. Rename all custom color references across components and pages: - primaryLight → primary-light - secondaryLight → secondary-light - primaryDark → primary-dark - secondaryDark → secondary-dark Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remove MenuButton.tsx and MobileMenu.tsx which used direct DOM manipulation (document.getElementById, classList.add/remove) to communicate — a React anti-pattern. Replace with MobileNav.tsx, a single client component that manages menu open/close state via useState and handles resize cleanup via useEffect. Update Navbar.tsx to use MobileNav instead of MenuButton. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Split Links.tsx into server-safe data (Links.tsx) and client-side JSX with icons (NavLinks.tsx with "use client") to properly handle the server/client module boundary in Next.js 15 - Add "use client" to Sidebar.tsx since it renders client-provided JSX - Fix providers.tsx: replace deprecated JSX.Element with ReactNode (global JSX namespace removed in React 19) - Fix FooterNote.tsx: dynamic copyright year, remove unused React import - Extract childrenCommonStyles to lib/styles.ts to avoid circular imports from layout files; update all page imports Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Delete next.svg and vercel.svg from public/ — leftover boilerplate from create-next-app that are not referenced anywhere in the project. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Rewrite README to reflect the upgraded tech stack: - Updated tech stack section (Next.js 15, React 19, Tailwind CSS 4) - Added complete project structure tree - Added Getting Started section with prerequisites, install, dev, build, and lint instructions - Updated features list Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Add engines field to package.json and .nvmrc file specifying Node.js 24.x. Vercel discontinued Node.js 18.x — this ensures the deployment platform uses a supported runtime version. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR upgrades the entire project from Next.js 13.4.9 to the latest modern architecture, fixing anti-patterns along the way and bringing all dependencies to their current major versions.
Dependency upgrades
next13.4.9 → 15.x (Turbopack enabled for dev)react/react-dom18.2.0 → 19.xtailwindcss3.3.3 → 4.xnext-themes0.2.1 → 0.4.4 (React 19 support)lucide-react0.260 → 0.474eslint8 → 9,typescript5.1 → 5.7devDependenciesConfig file migrations
next.config.js→next.config.ts(typedNextConfig)tailwind.config.jsdeleted — custom theme colors now live inglobals.cssvia the Tailwind v4@themedirectivepostcss.config.jsupdated to use@tailwindcss/postcss.eslintrc.json→eslint.config.mjs(ESLint 9 flat config)tsconfig.json: targetes5→es2017,moduleResolutionnode→bundlerTailwind class renames
Tailwind CSS 4
@themegenerates kebab-case utility names. All custom color classes updated across components:primaryLight→primary-lightsecondaryLight→secondary-lightprimaryDark→primary-darksecondaryDark→secondary-darkMobile menu refactor
MenuButton.tsxandMobileMenu.tsxuseddocument.getElementById/classListto communicate — a React anti-pattern. Replaced with a singleMobileNav.tsxclient component that manages visibility viauseStateand cleans up a resize listener viauseEffect.Component and module fixes
Links.tsxsplit into two files:Links.tsx(server-safe plain data) andNavLinks.tsx(client component with JSX icons), properly respecting the Next.js 15 server/client module boundarySidebar.tsxmarked"use client"since it renders client-provided JSX fromNavLinks.tsxproviders.tsx—JSX.Element→ReactNode(globalJSXnamespace removed in React 19)FooterNote.tsx— hardcoded2023→{new Date().getFullYear()}lib/styles.tscreated to holdchildrenCommonStyles, removing a circular import from the layout filesuppressHydrationWarningremoved from<main>(was masking the now-fixed DOM anti-pattern)Cleanup
public/next.svgandpublic/vercel.svgREADME.mdwith current tech stack, full project structure, and getting-started instructionsTest plan
npm installcompletes without errorsnpm run buildcompiles and statically generates all routesnpm run lintreports no warnings or errorsnpm run devstarts Turbopack dev server onlocalhost:3000