From 0f4ff4bda10717fb2ae0f8e6edfd9cd17296f6db Mon Sep 17 00:00:00 2001 From: Matthew Date: Wed, 19 Nov 2025 13:29:10 +0900 Subject: [PATCH 1/2] Add ability to pass multiple configuration files to the dev server --- packages/cloudflare/src/cli/commands/utils.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/packages/cloudflare/src/cli/commands/utils.ts b/packages/cloudflare/src/cli/commands/utils.ts index 4bed37d4..6b71e4db 100644 --- a/packages/cloudflare/src/cli/commands/utils.ts +++ b/packages/cloudflare/src/cli/commands/utils.ts @@ -129,7 +129,7 @@ export function withWranglerOptions(args: T) { type WranglerInputArgs = { configPath: string | undefined; - config: string | undefined; + config: string | string[] | undefined; env: string | undefined; remote?: boolean | undefined; }; @@ -151,9 +151,11 @@ function getWranglerArgs(args: WranglerInputArgs & { _: (string | number)[] }): } } + const configValues = [args.config].flat().filter((v): v is string => Boolean(v)); + return [ ...(args.configPath ? ["--config", args.configPath] : []), - ...(args.config ? ["--config", args.config] : []), + ...(configValues.length > 0 ? configValues.flatMap((config) => ["--config", config]) : []), ...(args.env ? ["--env", args.env] : []), ...(args.remote ? ["--remote"] : []), // Note: the first args in `_` will be the commands. @@ -169,9 +171,10 @@ function getWranglerArgs(args: WranglerInputArgs & { _: (string | number)[] }): export function withWranglerPassthroughArgs>( args: T ): WithWranglerArgs { + const [config] = [args.config].flat().filter(Boolean); return { ...args, - wranglerConfigPath: args.config ?? args.configPath, + wranglerConfigPath: config ?? args.configPath, wranglerArgs: getWranglerArgs(args), }; } From 0a59d7fe45fb84d6f0e6e1ef1394277c3ed3bb5a Mon Sep 17 00:00:00 2001 From: Matthew Date: Wed, 19 Nov 2025 13:49:08 +0900 Subject: [PATCH 2/2] Create whole-coats-poke.md --- .changeset/whole-coats-poke.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/whole-coats-poke.md diff --git a/.changeset/whole-coats-poke.md b/.changeset/whole-coats-poke.md new file mode 100644 index 00000000..61f6a9a4 --- /dev/null +++ b/.changeset/whole-coats-poke.md @@ -0,0 +1,5 @@ +--- +"@opennextjs/cloudflare": minor +--- + +Add ability to pass multiple configuration files to the dev server