From 881995ca0e1b80e3d3b97fadcd31c48786fd6c8c Mon Sep 17 00:00:00 2001 From: Pooya Parsa Date: Thu, 6 Mar 2025 12:26:41 +0100 Subject: [PATCH] fix: find `wrangler.jsonc` and `wrangler.json` as config files --- src/index.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/index.ts b/src/index.ts index 14ed1ca..9968938 100644 --- a/src/index.ts +++ b/src/index.ts @@ -28,9 +28,12 @@ async function nitroModule(nitro: Nitro) { // Find wrangler.toml let configPath = nitro.options.cloudflareDev?.configPath; if (!configPath) { - configPath = await findFile("wrangler.toml", { - startingFrom: nitro.options.srcDir, - }).catch(() => undefined); + configPath = await findFile( + ["wrangler.json", "wrangler.jsonc", "wrangler.toml"], + { + startingFrom: nitro.options.srcDir, + }, + ).catch(() => undefined); } // Resolve the persist dir