mirror of
https://github.com/FranP-code/create-better-t-stack.git
synced 2025-10-12 23:52:15 +00:00
add cloudflare workers support for all frontends (#366)
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
import { defineCloudflareConfig } from "@opennextjs/cloudflare/config";
|
||||
// import r2IncrementalCache from "@opennextjs/cloudflare/overrides/incremental-cache/r2-incremental-cache";
|
||||
|
||||
export default defineCloudflareConfig({
|
||||
// incrementalCache: r2IncrementalCache,
|
||||
});
|
||||
22
apps/cli/templates/deploy/web/react/next/wrangler.jsonc.hbs
Normal file
22
apps/cli/templates/deploy/web/react/next/wrangler.jsonc.hbs
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"$schema": "../../node_modules/wrangler/config-schema.json",
|
||||
"main": ".open-next/worker.js",
|
||||
"name": "{{projectName}}",
|
||||
"compatibility_date": "2025-07-05",
|
||||
"compatibility_flags": ["nodejs_compat", "global_fetch_strictly_public"],
|
||||
"assets": {
|
||||
"directory": ".open-next/assets",
|
||||
"binding": "ASSETS"
|
||||
},
|
||||
// "r2_buckets": [
|
||||
// // Use R2 incremental cache
|
||||
// // See https://opennext.js.org/cloudflare/caching
|
||||
// {
|
||||
// "binding": "NEXT_INC_CACHE_R2_BUCKET",
|
||||
// // Create the bucket before deploying
|
||||
// // You can change the bucket name if you want
|
||||
// // See https://developers.cloudflare.com/workers/wrangler/commands/#r2-bucket-create
|
||||
// "bucket_name": "cache"
|
||||
// }
|
||||
// ]
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"$schema": "../../node_modules/wrangler/config-schema.json",
|
||||
"name": "{{projectName}}",
|
||||
"compatibility_date": "2025-04-03",
|
||||
"assets": {
|
||||
"not_found_handling": "single-page-application"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"$schema": "../../node_modules/wrangler/config-schema.json",
|
||||
"name": "{{projectName}}",
|
||||
"compatibility_date": "2025-04-03",
|
||||
"assets": {
|
||||
"not_found_handling": "single-page-application"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user