-
Notifications
You must be signed in to change notification settings - Fork 10.4k
[Workers] deploy existing remix app to workers #17379
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1 files reviewed, 1 total issue(s) found.
| } from "~/components"; | ||
|
|
||
| In this guide, you will create a new [Remix](https://remix.run/) application and deploy to Cloudflare Workers (with the new [<InlineBadge preset="beta" /> Workers Assets](/workers/static-assets/)). | ||
| In this guide, you can [create a new](/workers/frameworks/framework-guides/remix/#create-a-new-application) or [deploy an existing](/workers/frameworks/framework-guides/remix/#deploy-an-existing-remix-application) [Remix](https://remix.run/) application to Cloudflare Workers with the new [<InlineBadge preset="beta" /> Workers Assets](/workers/static-assets/) feature. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| In this guide, you can [create a new](/workers/frameworks/framework-guides/remix/#create-a-new-application) or [deploy an existing](/workers/frameworks/framework-guides/remix/#deploy-an-existing-remix-application) [Remix](https://remix.run/) application to Cloudflare Workers with the new [<InlineBadge preset="beta" /> Workers Assets](/workers/static-assets/) feature. | |
| In this guide, you can [create a new](/workers/frameworks/framework-guides/remix/#create-a-new-application) or [deploy an existing](/workers/frameworks/framework-guides/remix/#deploy-an-existing-remix-application) [Remix](https://remix.run/) application to Cloudflare Workers with the new [<InlineBadge preset="beta" /> Workers Assets](/workers/static-assets/) feature. |
Issues:
- Style Guide - (Terms-error) Use 'Workers' instead of 'workers'.
Fix Explanation:
The term 'workers' should be capitalized to 'Workers' to adhere to the style guide. This change ensures consistency and proper branding within the documentation.
Deploying cloudflare-docs with
|
| Latest commit: |
e374e1f
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://f43d5d7c.cloudflare-docs-7ou.pages.dev |
| Branch Preview URL: | https://remix-on-workers.cloudflare-docs-7ou.pages.dev |
|
Files with changes (up to 15) |
| Generates TypeScript definitions for Cloudflare Workers. | ||
|
|
||
| ```sh | ||
| npx wrangler types |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't looked at Remix's types in a long time. Are they compatible with --experimental-include-runtime? This has a much better experience, so if it works with this project, I'd suggest we consider documenting that here instead.
| // This object matches the return value from Wrangler's | ||
| // `getPlatformProxy` used during development via Remix's | ||
| // `cloudflareDevProxyVitePlugin`: | ||
| // https://developers.cloudflare.com/workers/wrangler/api/#getplatformproxy | ||
| cf: request.cf, | ||
| ctx: { | ||
| waitUntil: ctx.waitUntil.bind(ctx), | ||
| passThroughOnException: ctx.passThroughOnException.bind(ctx), | ||
| }, | ||
| caches, | ||
| env, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can probably get away with just:
| // This object matches the return value from Wrangler's | |
| // `getPlatformProxy` used during development via Remix's | |
| // `cloudflareDevProxyVitePlugin`: | |
| // https://developers.cloudflare.com/workers/wrangler/api/#getplatformproxy | |
| cf: request.cf, | |
| ctx: { | |
| waitUntil: ctx.waitUntil.bind(ctx), | |
| passThroughOnException: ctx.passThroughOnException.bind(ctx), | |
| }, | |
| caches, | |
| env, | |
| // This object matches the return value from Wrangler's | |
| // `getPlatformProxy` used during development via Remix's | |
| // `cloudflareDevProxyVitePlugin`: | |
| // https://developers.cloudflare.com/workers/wrangler/api/#getplatformproxy | |
| cf: request.cf, | |
| ctx, | |
| caches, | |
| env, |
| }; | ||
| ``` | ||
|
|
||
| ### 9. Update styling |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this needed just because we're using the Classic compiler over Vite?
|
Closing this out as it's been sitting for a while and seems stale. Can always re-open if needed! |
Stitched together from:
Needs to be checked to make sure it follows best practices.