diff options
| author | Maze Winther <mazewinther@gmail.com> | 2026-03-26 13:54:36 +0100 |
|---|---|---|
| committer | Maze Winther <mazewinther@gmail.com> | 2026-03-29 15:49:30 +0200 |
| commit | 6dd8191f4b6c163a7bf50d506bfaba79adb357f6 (patch) | |
| tree | 6d3796558d5c9d419490f35492c13245606a5684 /apps | |
| parent | 722dcdd88face3724c77d23bc36a00524e552551 (diff) | |
| download | opencut-6dd8191f4b6c163a7bf50d506bfaba79adb357f6.tar.gz | |
chore: init cloudflare
Diffstat (limited to 'apps')
| -rw-r--r-- | apps/web/next-env.d.ts | 2 | ||||
| -rw-r--r-- | apps/web/next.config.ts | 3 | ||||
| -rw-r--r-- | apps/web/package.json | 8 | ||||
| -rw-r--r-- | apps/web/public/_headers | 2 | ||||
| -rw-r--r-- | apps/web/wrangler.jsonc | 17 |
5 files changed, 29 insertions, 3 deletions
diff --git a/apps/web/next-env.d.ts b/apps/web/next-env.d.ts index c4b7818f..9edff1c7 100644 --- a/apps/web/next-env.d.ts +++ b/apps/web/next-env.d.ts @@ -1,6 +1,6 @@ /// <reference types="next" /> /// <reference types="next/image-types/global" /> -import "./.next/dev/types/routes.d.ts"; +import "./.next/types/routes.d.ts"; // NOTE: This file should not be edited // see https://nextjs.org/docs/app/api-reference/config/typescript for more information. diff --git a/apps/web/next.config.ts b/apps/web/next.config.ts index 334e486e..b794bff4 100644 --- a/apps/web/next.config.ts +++ b/apps/web/next.config.ts @@ -1,6 +1,9 @@ import type { NextConfig } from "next"; import { withBotId } from "botid/next/config"; import { withContentCollections } from "@content-collections/next"; +import { initOpenNextCloudflareForDev } from "@opennextjs/cloudflare"; + +initOpenNextCloudflareForDev(); const nextConfig: NextConfig = { turbopack: { diff --git a/apps/web/package.json b/apps/web/package.json index 9c8f229d..aa792c73 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -7,6 +7,8 @@ "dev": "next dev --turbopack", "build": "next build", "start": "next start", + "preview": "opennextjs-cloudflare build && opennextjs-cloudflare preview", + "deploy": "opennextjs-cloudflare build && opennextjs-cloudflare deploy", "lint": "biome check src/", "lint:fix": "biome check src/ --write", "format": "biome format src/ --write", @@ -22,6 +24,7 @@ "@huggingface/transformers": "^3.8.1", "@opencut/env": "workspace:*", "@opencut/ui": "workspace:*", + "@opennextjs/cloudflare": "^1.17.3", "@radix-ui/react-accordion": "^1.2.12", "@radix-ui/react-checkbox": "^1.3.3", "@radix-ui/react-dialog": "^1.1.15", @@ -35,7 +38,6 @@ "@upstash/ratelimit": "^2.0.6", "@upstash/redis": "^1.35.4", "better-auth": "^1.2.7", - "botid": "^1.4.2", "class-variance-authority": "^0.7.1", "clsx": "^2.1.1", "cmdk": "^1.0.0", @@ -48,6 +50,7 @@ "lucide-react": "^0.562.0", "mediabunny": "^1.29.1", "motion": "^12.18.1", + "botid": "^1.4.2", "nanoid": "^5.1.5", "next": "16.1.3", "next-themes": "^0.4.4", @@ -95,6 +98,7 @@ "raw-loader": "^4.0.2", "sharp": "^0.34.5", "tailwindcss": "^4.2.1", - "typescript": "^5.8.3" + "typescript": "^5.8.3", + "wrangler": "^4.77.0" } } diff --git a/apps/web/public/_headers b/apps/web/public/_headers new file mode 100644 index 00000000..3b460e68 --- /dev/null +++ b/apps/web/public/_headers @@ -0,0 +1,2 @@ +/_next/static/* + Cache-Control: public,max-age=31536000,immutable diff --git a/apps/web/wrangler.jsonc b/apps/web/wrangler.jsonc new file mode 100644 index 00000000..c0d7272f --- /dev/null +++ b/apps/web/wrangler.jsonc @@ -0,0 +1,17 @@ +{ + "$schema": "node_modules/wrangler/config-schema.json", + "name": "opencut", + "main": ".open-next/worker.js", + "compatibility_date": "2025-04-01", + "compatibility_flags": ["nodejs_compat", "global_fetch_strictly_public"], + "assets": { + "directory": ".open-next/assets", + "binding": "ASSETS" + }, + "services": [ + { + "binding": "WORKER_SELF_REFERENCE", + "service": "opencut" + } + ] +} |
