Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(cloudflare-module): use new workers static assets #2800

Merged
merged 2 commits into from
Oct 18, 2024
Merged

Conversation

pi0
Copy link
Member

@pi0 pi0 commented Oct 18, 2024

Ref: #2764

This preset enables a new cloudflare-module preset that leverages Workers Static assets.

Note: It will be enabled if compatibility_date is set to 2024-09-19 or later.

An optional ASSETS binding handler is also included but it will be used as a fallback only if ASSETS binding is configured (no specific purpose for now other than testing!)

I have not included docs updates in this PR yet mainly first to try it, but early tests show it works well (except for the mini flare).

Quick migration:

  1. Update compatibility_date to 2024-09-19 in Nuxt/Nitro config
  2. Update wrangler.toml: (remove old [site] config)
compatibility_date = "2024-09-19"

++ assets = { directory = "./.output/public/" }
-- [site]
-- bucket = ".output/public"

@pi0 pi0 self-assigned this Oct 18, 2024
@pi0 pi0 changed the title feat(cloudflare-workers): use new assets handler with compatibility_date feat(cloudflare-workers): use new workers static assets Oct 18, 2024
@pi0 pi0 changed the title feat(cloudflare-workers): use new workers static assets feat(cloudflare-module): use new workers static assets Oct 18, 2024
@pi0 pi0 merged commit 9df404a into v2 Oct 18, 2024
5 checks passed
@pi0 pi0 deleted the feat/cloudflare-static branch October 18, 2024 16:55
@pi0 pi0 mentioned this pull request Oct 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant