this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Add support for wrangler environment selection in next dev mode (#243)

authored by

Joe Mifsud and committed by
GitHub
41c55a87 a816233b

+9 -1
+5
.changeset/lemon-zoos-chew.md
··· 1 + --- 2 + "@opennextjs/cloudflare": patch 3 + --- 4 + 5 + Add support for specifying wrangler environment when using next dev so that bindings and vars are properly loaded. This can be specified with the env variable NEXT_DEV_WRANGLER_ENV.
+4 -1
packages/cloudflare/src/api/get-cloudflare-context.ts
··· 71 71 const { getPlatformProxy } = await import( 72 72 /* webpackIgnore: true */ `${"__wrangler".replaceAll("_", "")}` 73 73 ); 74 - const { env, cf, ctx } = await getPlatformProxy(); 74 + const { env, cf, ctx } = await getPlatformProxy({ 75 + // This allows the selection of a wrangler environment while running in next dev mode 76 + environment: process.env.NEXT_DEV_WRANGLER_ENV, 77 + }); 75 78 global[cloudflareContextInNextDevSymbol] = { 76 79 env, 77 80 cf: cf as unknown as CfProperties,