Update wrangler config template in astro add#15047
Conversation
Updates the generated wrangler.jsonc template to use correct main entrypoint, hardcoded compatibility_date, and removes unnecessary compatibility_flags.
🦋 Changeset detectedLatest commit: 7672a7e The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
| 📦 Package | 🔒 Before | 🔓 After |
|---|---|---|
| @cloudflare/unenv-preset | trusted-with-provenance | none |
| workerd | trusted-with-provenance | none |
| undici | provenance | none |
| miniflare | trusted-with-provenance | none |
| youch | provenance | none |
| @cloudflare/workerd-darwin-64 | trusted-with-provenance | none |
| @cloudflare/workerd-darwin-arm64 | trusted-with-provenance | none |
| @cloudflare/workerd-linux-64 | trusted-with-provenance | none |
| @cloudflare/workerd-linux-arm64 | trusted-with-provenance | none |
| @cloudflare/workerd-windows-64 | trusted-with-provenance | none |
| wrangler | trusted-with-provenance | none |
packages/astro/src/cli/add/index.ts
Outdated
| CLOUDFLARE_WRANGLER_CONFIG: (name: string) => `\ | ||
| { | ||
| "main": "dist/_worker.js/index.js", | ||
| "compatibility_date": "2025-05-21", |
There was a problem hiding this comment.
We could export a util from @cloudflare/vite-plugin to get the latest compatibility_date supported by the installed version. You could then use that to provide the value here. Would that be helpful?
In the meantime, it would be good to use a more recent compatibility date.
There was a problem hiding this comment.
Ah yeah that probably does make sense.
There was a problem hiding this comment.
That would be great :)
Changes
compatibility_dateto the one we have in the cloudflare integration.compatibility_flagswhich is no longer needed.Testing
Test manually.
Docs
N/A