Is your feature request related to a problem?
There are various configurations needed in an open-next wrangler.jsonc's configuration: https://opennext.js.org/cloudflare/get-started#3-create-a-wrangler-configuration-file
It's easy to miss some of them, for example I've missed the WORKER_SELF_REFERENCE in a project (see: nodejs/nodejs.org#8589) and it wasn't immediately apparent that that was the issue.
Describe the solution you'd like
The open-next config file is validated for the Cloudflare adapter using this function:
|
export function ensureCloudflareConfig(config: OpenNextConfig) { |
It would be valuable to also add some analogous functionality for the wrangler.jsonc file to ensure that the wrangler configuration is valid.
Describe alternatives you've considered
Runtime checks could also be put in place to ensure that the worker is properly configured. But most likely having an upfront config validation is more robust and secure for users.
@opennextjs/cloudflare version
1.16.2
Additional context
No response
Before submitting
Is your feature request related to a problem?
There are various configurations needed in an open-next wrangler.jsonc's configuration: https://opennext.js.org/cloudflare/get-started#3-create-a-wrangler-configuration-file
It's easy to miss some of them, for example I've missed the
WORKER_SELF_REFERENCEin a project (see: nodejs/nodejs.org#8589) and it wasn't immediately apparent that that was the issue.Describe the solution you'd like
The open-next config file is validated for the Cloudflare adapter using this function:
opennextjs-cloudflare/packages/cloudflare/src/cli/build/utils/ensure-cf-config.ts
Line 11 in ad6b3ac
It would be valuable to also add some analogous functionality for the wrangler.jsonc file to ensure that the wrangler configuration is valid.
Describe alternatives you've considered
Runtime checks could also be put in place to ensure that the worker is properly configured. But most likely having an upfront config validation is more robust and secure for users.
@opennextjs/cloudflare version
1.16.2
Additional context
No response
Before submitting