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

Vite: Cloudflare Proxy plugin #8749

Merged
merged 24 commits into from
Feb 15, 2024
Merged

Conversation

pcattori
Copy link
Contributor

@pcattori pcattori commented Feb 13, 2024

  • auto-set ssr conditions
  • caches / dispose
  • test wrangler
  • template
  • docs
  • wrangler typegen
  • deployment checklist (setup resources/bindings in CF dashboard)
  • remove dispose from cloudflare context
  • rename plugin to devCloudflareProxyVitePlugin as remixDevCloudflareProxy
  • way to set options for getPlatformProxy. passthru?
  • order validation
  • changeset
cloudflareProxy({ getLoadContext, persist: true })

Copy link

changeset-bot bot commented Feb 13, 2024

🦋 Changeset detected

Latest commit: 5373f38

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 16 packages
Name Type
@remix-run/cloudflare-pages Minor
@remix-run/dev Minor
create-remix Minor
remix Minor
@remix-run/architect Minor
@remix-run/cloudflare Minor
@remix-run/cloudflare-workers Minor
@remix-run/css-bundle Minor
@remix-run/deno Minor
@remix-run/eslint-config Minor
@remix-run/express Minor
@remix-run/node Minor
@remix-run/react Minor
@remix-run/serve Minor
@remix-run/server-runtime Minor
@remix-run/testing Minor

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

@pcattori pcattori changed the title Pedro/vite cloudflare proxy plugin [WIP] Vite cloudflare proxy plugin Feb 13, 2024
@pcattori pcattori force-pushed the pedro/vite-cloudflare-proxy-plugin branch from da0b2fb to ee6967e Compare February 13, 2024 23:41
@pcattori pcattori force-pushed the pedro/vite-cloudflare-proxy-plugin branch from c0da97b to 57ba779 Compare February 14, 2024 20:34
@pcattori pcattori force-pushed the pedro/vite-cloudflare-proxy-plugin branch from 57ba779 to a15d6b6 Compare February 14, 2024 20:39
- vite vs wrangler
- deployment warning for bindings
docs/future/presets.md Outdated Show resolved Hide resolved
@pcattori pcattori marked this pull request as ready for review February 15, 2024 18:36
@pcattori pcattori changed the title [WIP] Vite cloudflare proxy plugin Vite: Cloudflare Proxy plugin Feb 15, 2024
@pcattori pcattori merged commit e7797e9 into dev Feb 15, 2024
9 checks passed
@pcattori pcattori deleted the pedro/vite-cloudflare-proxy-plugin branch February 15, 2024 22:21
@github-actions github-actions bot added the awaiting release This issue has been fixed and will be released soon label Feb 15, 2024
Copy link
Contributor

🤖 Hello there,

We just published version 2.7.0-pre.0 which includes this pull request. If you'd like to take it for a test run please try it out and let us know what you think!

Thanks!

Copy link
Contributor

🤖 Hello there,

We just published version 2.7.0 which includes this pull request. If you'd like to take it for a test run please try it out and let us know what you think!

Thanks!

@github-actions github-actions bot removed the awaiting release This issue has been fixed and will be released soon label Feb 20, 2024
@aaronadamsCA
Copy link
Contributor

aaronadamsCA commented Feb 20, 2024

Just a friendly heads-up that this is a wider breaking change than what was mentioned in the changelog. All @remix-run/cloudflare-pages projects with a custom getLoadContext function are affected. Our apps with server.ts files all need to be fixed up now.

It's a better API, no doubt—I'm glad for the change! Just don't want anyone caught out like we were, as the change is non-obvious.

@pcattori
Copy link
Contributor Author

@aaronadamsCA can you share what error or issue you encountered and what you change you made to your getLoadContext functions?

@pcattori
Copy link
Contributor Author

Ah I think I see the issue. We changed how the context was passed in from (cloudflare) => ... to ({context: { cloudflare } }) => ... . Good call out, I'll see how we can patch any breaks for this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants