Skip to content

Commit 50fc6b0

Browse files
committed
chore: adaptation for CloudFare deployment
1 parent 08afb32 commit 50fc6b0

File tree

6 files changed

+4281
-490
lines changed

6 files changed

+4281
-490
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,7 @@ yarn-error.log*
3636
# Misc
3737
.DS_Store
3838
*.pem
39+
40+
# Open Next
41+
.open-next
42+
.wrangler

package.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"scripts": {
1010
"build": "turbo run build",
1111
"check-types": "turbo run check-types",
12+
"deploy:playground": "pnpm --filter soybean-react-ui-playground deploy",
1213
"dev": "turbo run dev",
1314
"format": "prettier --write \"**/*.{ts,tsx,md}\"",
1415
"lint": "turbo run lint",
@@ -28,5 +29,10 @@
2829
"tsup": "8.5.0",
2930
"turbo": "2.5.4",
3031
"typescript": "5.8.2"
32+
},
33+
"pnpm": {
34+
"overrides": {
35+
"esbuild": "0.25.5"
36+
}
3137
}
3238
}

playground/open-next.config.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// default open-next.config.ts file created by @opennextjs/cloudflare
2+
import { defineCloudflareConfig } from "@opennextjs/cloudflare/config";
3+
import r2IncrementalCache from "@opennextjs/cloudflare/overrides/incremental-cache/r2-incremental-cache";
4+
5+
export default defineCloudflareConfig({
6+
incrementalCache: r2IncrementalCache,
7+
});

playground/package.json

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
{
2-
"name": "playground",
2+
"name": "soybean-react-ui-playground",
33
"version": "0.1.0",
44
"private": true,
55
"scripts": {
66
"build": "next build",
7+
"cf-typegen": "wrangler types --env-interface CloudflareEnv cloudflare-env.d.ts",
8+
"deploy": "opennextjs-cloudflare build && opennextjs-cloudflare deploy",
79
"dev": "next dev --turbopack",
810
"lint": "next lint",
9-
"start": "next start"
11+
"preview": "opennextjs-cloudflare build && opennextjs-cloudflare preview",
12+
"start": "next start",
13+
"upload": "opennextjs-cloudflare build && opennextjs-cloudflare upload"
1014
},
1115
"dependencies": {
1216
"embla-carousel-autoplay": "^8.6.0",
@@ -18,10 +22,16 @@
1822
},
1923
"devDependencies": {
2024
"@eslint/eslintrc": "^3",
25+
"@opennextjs/cloudflare": "^1.5.1",
2126
"@soybean-react-ui/tailwind-plugin": "workspace:*",
2227
"@tailwindcss/postcss": "4.1.11",
2328
"eslint": "9.30.0",
2429
"eslint-config-next": "15.3.4",
2530
"tailwindcss": "4.1.11"
31+
},
32+
"pnpm": {
33+
"overrides": {
34+
"esbuild": "0.25.5"
35+
}
2636
}
2737
}

playground/wrangler.jsonc

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"name": "soybean-react-ui-playground",
3+
"main": ".open-next/worker.js",
4+
"compatibility_date": "2025-07-13",
5+
"compatibility_flags": ["nodejs_compat"],
6+
"assets": {
7+
"directory": ".open-next/assets",
8+
"binding": "ASSETS"
9+
},
10+
"r2_buckets": [
11+
{
12+
"binding": "NEXT_INC_CACHE_R2_BUCKET",
13+
"bucket_name": "skyroc",
14+
"preview_bucket_name": "skyroc"
15+
}
16+
]
17+
}

0 commit comments

Comments
 (0)