diff --git a/.gitignore b/.gitignore index 537ca16..a0837e4 100644 --- a/.gitignore +++ b/.gitignore @@ -24,5 +24,3 @@ logs !.env.example .wrangler -wrangler.* -wrangler.jsonc diff --git a/nuxt.config.ts b/nuxt.config.ts index 7655c5c..29bdb8d 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -97,13 +97,17 @@ export default defineNuxtConfig({ }, ], defaultLocale: 'en', - }, + }, nitro: { preset: 'cloudflare_module', - prerender: { - routes: ['/'], - }, + cloudflare: { + deployConfig: true, + nodeCompat: true + } + // prerender: { + // routes: ['/'], + // }, }, runtimeConfig: { diff --git a/wrangler.jsonc b/wrangler.jsonc new file mode 100644 index 0000000..9e323e0 --- /dev/null +++ b/wrangler.jsonc @@ -0,0 +1,51 @@ +{ + "$schema": "node_modules/wrangler/config-schema.json", + "name": "artsite", + "compatibility_date": "2025-12-13", + "compatibility_flags": [ + "nodejs_compat", + ], + "preview_urls": true, + "workers_dev": true, + "main": "./.output/server/index.mjs", + "routes": [ + { + "pattern": "v2.arthurdanjou.fr", + "zone_name": "arthurdanjou.fr", + "custom_domain": true + } + ], + "placement": { + "mode": "smart", + }, + "assets": { + "binding": "ASSETS", + "directory": "./.output/public/" + }, + "d1_databases": [ + { + "binding": "DB", + "database_id": "d6e8c2ff-399a-4bec-b1b3-4bfe57d50ea8" + } + ], + "kv_namespaces": [ + { + "binding": "CACHE", + "id": "f0766ace1d24423ba6e5cac4fb8f2054", + } + ], + "observability": { + "enabled": true, + "logs": { + "enabled": true, + "head_sampling_rate": 1, + "persist": true, + "invocation_logs": true + }, + "traces": { + "enabled": true, + "head_sampling_rate": 1, + "persist": true + } + }, +} \ No newline at end of file