mirror of
https://github.com/vercel/next.js.git
synced 2026-09-20 02:25:18 +08:00
70d357a3ea
## Summary Updates the `with-mysql` example to use latest versions of all dependencies. ### What - Migrate from Pages Router to App Router - Update to React 19 and Next.js latest - Update to Tailwind CSS v4 with `@import "tailwindcss"` syntax - Update to Prisma 7 with `@prisma/adapter-planetscale` driver adapter - Convert all files to TypeScript - Remove unused API route and `vercel.svg` - Update README to clarify this is for PlanetScale MySQL and link to [vercel/postgres-next-starter](https://github.com/vercel/postgres-next-starter) for Postgres users ### Why The example was significantly outdated: - Prisma 3.10.0 → Prisma 7 (latest) - Tailwind 3.0.23 → Tailwind 4 - React 18.2.0 → React 19 - Pages Router → App Router ### How Followed the official migration guides: - [Prisma 7 upgrade guide](https://www.prisma.io/docs/orm/more/upgrade-guides/upgrading-versions/upgrading-to-prisma-7) - [PlanetScale quickstart with Prisma](https://www.prisma.io/docs/getting-started/prisma-orm/quickstart/planetscale) - Aligned configuration files with a fresh `create-next-app` output ## Related N/A ## How to Test ```bash cd examples/with-mysql npm install # Set up .env with your PlanetScale DATABASE_URL npx prisma generate npx prisma db push npx prisma db seed npm run dev ``` ## Checklist - [x] Tests and samples are included - [x] Documentation is updated (README) --------- Co-authored-by: vercel[bot] <35613825+vercel[bot]@users.noreply.github.com>
33 lines
666 B
JSON
33 lines
666 B
JSON
{
|
|
"type": "module",
|
|
"private": true,
|
|
"scripts": {
|
|
"dev": "next dev",
|
|
"build": "next build",
|
|
"start": "next start",
|
|
"lint": "next lint"
|
|
},
|
|
"prisma": {
|
|
"seed": "tsx prisma/seed.ts"
|
|
},
|
|
"dependencies": {
|
|
"@prisma/adapter-planetscale": "latest",
|
|
"@prisma/client": "latest",
|
|
"next": "latest",
|
|
"react": "^19.0.0",
|
|
"react-dom": "^19.0.0",
|
|
"undici": "^7"
|
|
},
|
|
"devDependencies": {
|
|
"@tailwindcss/postcss": "^4",
|
|
"@types/node": "^20",
|
|
"@types/react": "^19",
|
|
"@types/react-dom": "^19",
|
|
"dotenv": "^16",
|
|
"prisma": "latest",
|
|
"tailwindcss": "^4",
|
|
"tsx": "^4",
|
|
"typescript": "^5"
|
|
}
|
|
}
|