mirror of
https://github.com/nihonbuzz/nihonbuzz.git
synced 2026-01-26 05:15:36 +07:00
chore: migrate to OpenNext adapter for Cloudflare Pages (Next.js 16 support)
This commit is contained in:
4
.gitignore
vendored
4
.gitignore
vendored
@@ -39,3 +39,7 @@ yarn-error.log*
|
||||
# typescript
|
||||
*.tsbuildinfo
|
||||
next-env.d.ts
|
||||
|
||||
# Cloudflare / OpenNext
|
||||
.open-next
|
||||
.wrangler
|
||||
|
||||
9
open-next.config.ts
Normal file
9
open-next.config.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import { defineCloudflareConfig } from "@opennextjs/cloudflare";
|
||||
|
||||
export default defineCloudflareConfig({
|
||||
// Uncomment to enable R2 cache,
|
||||
// It should be imported as:
|
||||
// `import r2IncrementalCache from "@opennextjs/cloudflare/overrides/incremental-cache/r2-incremental-cache";`
|
||||
// See https://opennext.js.org/cloudflare/caching for more details
|
||||
// incrementalCache: r2IncrementalCache,
|
||||
});
|
||||
14459
package-lock.json
generated
14459
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -6,7 +6,9 @@
|
||||
"dev": "next dev",
|
||||
"build": "next build",
|
||||
"start": "next start",
|
||||
"lint": "eslint"
|
||||
"lint": "eslint",
|
||||
"deploy": "opennextjs-cloudflare build && opennextjs-cloudflare deploy",
|
||||
"preview": "opennextjs-cloudflare build && opennextjs-cloudflare preview"
|
||||
},
|
||||
"dependencies": {
|
||||
"@radix-ui/react-accordion": "^1.2.12",
|
||||
@@ -24,7 +26,7 @@
|
||||
"tailwind-merge": "^3.4.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@cloudflare/next-on-pages": "^1.13.16",
|
||||
"@opennextjs/cloudflare": "^1.15.1",
|
||||
"@tailwindcss/postcss": "^4",
|
||||
"@types/node": "^20",
|
||||
"@types/react": "^19",
|
||||
@@ -33,6 +35,7 @@
|
||||
"eslint-config-next": "16.1.4",
|
||||
"tailwindcss": "^4",
|
||||
"tw-animate-css": "^1.4.0",
|
||||
"typescript": "^5"
|
||||
"typescript": "^5",
|
||||
"wrangler": "^4.60.0"
|
||||
}
|
||||
}
|
||||
|
||||
34
wrangler.jsonc
Normal file
34
wrangler.jsonc
Normal file
@@ -0,0 +1,34 @@
|
||||
/**
|
||||
* For more details on how to configure Wrangler, refer to:
|
||||
* https://developers.cloudflare.com/workers/wrangler/configuration/
|
||||
*/
|
||||
{
|
||||
"$schema": "node_modules/wrangler/config-schema.json",
|
||||
"name": "nihonbuzz",
|
||||
"main": ".open-next/worker.js",
|
||||
"compatibility_date": "2025-12-01",
|
||||
"compatibility_flags": [
|
||||
"nodejs_compat",
|
||||
"global_fetch_strictly_public"
|
||||
],
|
||||
"assets": {
|
||||
"binding": "ASSETS",
|
||||
"directory": ".open-next/assets"
|
||||
},
|
||||
"images": {
|
||||
// Enable image optimization
|
||||
// see https://opennext.js.org/cloudflare/howtos/image
|
||||
"binding": "IMAGES"
|
||||
},
|
||||
"services": [
|
||||
{
|
||||
// Self-reference service binding, the service name must match the worker name
|
||||
// see https://opennext.js.org/cloudflare/caching
|
||||
"binding": "WORKER_SELF_REFERENCE",
|
||||
"service": "nihonbuzz"
|
||||
}
|
||||
],
|
||||
"observability": {
|
||||
"enabled": true
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user