diff --git a/packages/cloudflare/src/cli/build/patches/to-investigate/patch-find-dir.ts b/packages/cloudflare/src/cli/build/patches/to-investigate/patch-find-dir.ts index 1984fb17..002579bf 100644 --- a/packages/cloudflare/src/cli/build/patches/to-investigate/patch-find-dir.ts +++ b/packages/cloudflare/src/cli/build/patches/to-investigate/patch-find-dir.ts @@ -11,18 +11,24 @@ import { Config } from "../../../config"; */ export function patchFindDir(code: string, config: Config): string { console.log("# patchFindDir"); - return code.replace( - "function findDir(dir, name) {", - `function findDir(dir, name) { - if (dir.endsWith(".next/server")) { - if (name === "app") { + const patchedCode = code.replace( + /function findDir\((?