From 319e2d0e9ae96629ac542e0747860806572508ef Mon Sep 17 00:00:00 2001 From: Arthur DANJOU Date: Thu, 18 Dec 2025 11:36:46 +0100 Subject: [PATCH] =?UTF-8?q?fix:=20mettre=20=C3=A0=20jour=20la=20configurat?= =?UTF-8?q?ion=20de=20wrangler=20et=20supprimer=20les=20fichiers=20inutile?= =?UTF-8?q?s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 2 -- nuxt.config.ts | 12 ++++++++---- wrangler.jsonc | 51 ++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 59 insertions(+), 6 deletions(-) create mode 100644 wrangler.jsonc 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