Skip to content
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

Upgrade NextJS to v14 #3

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
NEXT_PUBLIC_TURNSTILE_SITE_KEY=
TURNSTILE_SECRET_KEY=
RESEND_API_KEY=
7 changes: 1 addition & 6 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
{
"plugins": ["@typescript-eslint"],
"extends": ["next/core-web-vitals", "plugin:@typescript-eslint/recommended", "prettier"],
"rules": {
"@typescript-eslint/no-unused-vars": "error",
"@typescript-eslint/no-explicit-any": "error"
}
"extends": ["next/core-web-vitals", "next/typescript", "prettier"]
}
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
/node_modules
/.pnp
.pnp.js
.yarn/install-state.gz

# testing
/coverage
Expand All @@ -23,10 +24,10 @@
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*

# local env files
.env*.local
.dev.vars

# vercel
.vercel
Expand Down
2 changes: 1 addition & 1 deletion .node-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
17.9.0
22
3 changes: 0 additions & 3 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
{
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"typescript.tsdk": "node_modules/typescript/lib",
Expand Down
3 changes: 0 additions & 3 deletions assets/logos/prisma.svg

This file was deleted.

7 changes: 0 additions & 7 deletions assets/logos/sulu.svg

This file was deleted.

2 changes: 2 additions & 0 deletions cloudflare-env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
interface CloudflareEnv {
}
21 changes: 0 additions & 21 deletions components/organisms/about-me-section.tsx

This file was deleted.

128 changes: 0 additions & 128 deletions components/organisms/contact-section.tsx

This file was deleted.

7 changes: 0 additions & 7 deletions functions/_middleware.ts

This file was deleted.

27 changes: 0 additions & 27 deletions next.config.js

This file was deleted.

24 changes: 24 additions & 0 deletions next.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import { setupDevPlatform } from '@cloudflare/next-on-pages/next-dev';
import Webpack from 'webpack';

// Here we use the @cloudflare/next-on-pages next-dev module to allow us to use bindings during local development
// (when running the application with `next dev`), for more information see:
// https://github.com/cloudflare/next-on-pages/blob/main/internal-packages/next-dev/README.md
if (process.env.NODE_ENV === 'development') {
await setupDevPlatform();
}

/** @type {import('next').NextConfig} */
const nextConfig = {
webpack(config) {
config.plugins.push(new Webpack.EnvironmentPlugin(['NEXT_PUBLIC_TURNSTILE_SITE_KEY']));
config.module.rules.push({
test: /\.svg$/i,
use: ['@svgr/webpack'],
});

return config;
},
};

export default nextConfig;
63 changes: 35 additions & 28 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,38 +6,45 @@
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint"
"lint": "next lint",
"format": "prettier --write ./src",
"pages:build": "pnpm next-on-pages",
"preview": "pnpm pages:build && wrangler pages dev",
"deploy": "pnpm pages:build && wrangler pages deploy",
"cf-typegen": "wrangler types --env-interface CloudflareEnv cloudflare-env.d.ts"
},
"dependencies": {
"@cloudflare/pages-plugin-sentry": "^1.0.0",
"@sendgrid/helpers": "^7.7.0",
"class-variance-authority": "^0.3.0",
"next": "13.0.3",
"react": "18.2.0",
"react-dom": "18.2.0",
"@marsidev/react-turnstile": "^1.0.2",
"class-variance-authority": "^0.7.0",
"next": "14.2.14",
"react": "^18",
"react-dom": "^18",
"resend": "^4.0.0",
"slugger": "^1.0.1",
"tailwind-merge": "^1.8.0",
"zod": "^3.19.1",
"zod-form-data": "^1.2.4"
"tailwind-merge": "^2.5.3",
"zod": "^3.23.8",
"zod-form-data": "^2.0.2"
},
"devDependencies": {
"@cloudflare/workers-types": "^4.20221111.1",
"@svgr/webpack": "^6.5.1",
"@tailwindcss/forms": "^0.5.3",
"@tailwindcss/typography": "^0.5.8",
"@types/node": "18.11.9",
"@types/react": "18.0.25",
"@types/react-dom": "18.0.9",
"@typescript-eslint/eslint-plugin": "^5.43.0",
"autoprefixer": "^10.4.13",
"eslint": "8.27.0",
"eslint-config-next": "13.0.3",
"eslint-config-prettier": "^8.5.0",
"postcss": "^8.4.19",
"prettier": "^2.7.1",
"prettier-plugin-tailwindcss": "^0.1.13",
"tailwindcss": "^3.2.4",
"typescript": "4.9.3",
"vercel": "^28.5.6"
"@cloudflare/next-on-pages": "1",
"@cloudflare/workers-types": "^4.20241004.0",
"@svgr/webpack": "^8.1.0",
"@tailwindcss/forms": "^0.5.9",
"@tailwindcss/typography": "^0.5.15",
"@types/node": "^20",
"@types/react": "^18",
"@types/react-dom": "^18",
"autoprefixer": "^10.4.20",
"eslint": "^8",
"eslint-config-next": "14.2.14",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-next-on-pages": "^1.13.5",
"postcss": "^8",
"prettier": "^3.3.3",
"prettier-plugin-tailwindcss": "^0.6.8",
"tailwindcss": "^3.4.1",
"typescript": "^5",
"webpack": "^5.95.0",
"wrangler": "^3.80.0"
}
}
Loading