-
Notifications
You must be signed in to change notification settings - Fork 33
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
Replace vite-node-miniflare with cloudflareDevProxy from @react-router/dev #44
base: main
Are you sure you want to change the base?
Conversation
@ariofrio with this change does the d1 example actually still work? |
Ah, great catch. The
I'm unsure how to make this work with
|
Would it be worth in that case, having this PR just updates the cloudflare template, and open an issue with the above? |
I'm super new to both Cloudflare and Remix run but am really interested in getting set up with best practices while I'm learning. Seeing all of the complex vite plugin config get removed in this PR definitely seems appealing but I'm not fully understanding how I would go about using D1 with these changes. |
@WonderPanda I opened a PR on react-router-hono plugin that shows how simple is to use cloudflare and react router powered by a hono server, which claims to be the faster server for workers. Here is the example project |
Thanks, this looks really cool. I'll play around with on my end and see if fixes the issues I've been running into trying to ramp up on this stack. |
Let me know how it goes, also don't hesitate to reach out for any help, good luck! |
Issues with Cloudflare Templates
wrangler.toml
andvite.config.ts
for dev modevite.config.ts
requiring manual CJS dependency configuration inssr.optimizeDeps.include
to work in dev mode@hiogawa/vite-node-miniflare
for local dev modeSolution
Using
cloudflareDevProxy
from@react-router/dev
:wrangler.toml
for developmentssr
options or makes them unnecessarycloudflare
andcloudflare-d1
templates updated@jacob-ebey: Any thoughts on why the templates weren't using
cloudflareDevProxy
initially?Note: This supersedes #6 (does this for
cloudflare
template and also addswrangler types
support). That should be separate since we need to decide on npm scripts and.gitignore
handling.