Port to Next.js with static export for Cloudflare Pages

- Create Next.js app with TypeScript, Tailwind, and Postcss
- Extract API logic, types, and utilities to lib/
- Build React components for Race Results, Driver Standings, Points Key, and D3 Chart
- Use environment variables for API credentials (NEXT_PUBLIC_*)
- Static export (output: 'export') for Cloudflare Pages deployment
- D3 chart rendered client-side with dynamic import
- Update deploy workflow to build and deploy ./out directory
- Remove original public/index.html
This commit is contained in:
2026-03-01 14:21:02 +01:00
parent 04552e1eee
commit 6c9a5ea7a6
21 changed files with 3733 additions and 645 deletions

52
tsconfig.json Normal file
View File

@@ -0,0 +1,52 @@
{
"compilerOptions": {
"target": "ES2017",
"useDefineForClassFields": true,
"lib": [
"ES2020",
"DOM",
"DOM.Iterable"
],
"module": "ESNext",
"skipLibCheck": true,
/* Bundler mode */
"moduleResolution": "bundler",
"allowImportingTsExtensions": true,
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true,
"jsx": "preserve",
/* Linting */
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"baseUrl": ".",
"paths": {
"@/*": [
"./src/*"
]
},
"allowJs": true,
"incremental": true,
"plugins": [
{
"name": "next"
}
]
},
"include": [
"src",
".next/types/**/*.ts"
],
"references": [
{
"path": "./tsconfig.node.json"
}
],
"exclude": [
"node_modules"
]
}