Skip to content

Conversation

@MattieTK
Copy link

Hello!

I work on the authoring team at Cloudflare responsible for Vite on the Cloudflare Workers and Pages platform.

We wanted to suggest some updates to the documentation to highlight some of our work that we think will improve users experience using Cloudflare. The changes are summarised below:

  • Rename 'Cloudflare Pages' section to 'Cloudflare' in deployment guide
  • Add Cloudflare Workers as the primary deployment option
    • Include setup instructions for create-cloudflare CLI
    • Document how to add plugin to existing projects
    • Highlight Environment API integration and full platform support
  • Keep Cloudflare Pages as secondary option for existing projects
  • Reference Cloudflare Vite plugin as example in Environment API docs

Thanks so much, happy to work on this with you if you want further changes or clarifications,

Matt

cc: @jamesopstad

- Rename 'Cloudflare Pages' section to 'Cloudflare' in deployment guide
- Add Cloudflare Workers as the primary deployment option
  - Include setup instructions for create-cloudflare CLI
  - Document how to add plugin to existing projects
  - Highlight Environment API integration and full platform support
- Keep Cloudflare Pages as secondary option for existing projects
- Reference Cloudflare Vite plugin as example in Environment API docs

Cloudflare Workers with the Vite plugin is now the recommended approach
for deploying Vite applications to Cloudflare, supporting SPAs, SSR,
and the full Cloudflare Developer Platform.
Comment on lines 181 to 188
#### Create a new app

You can create a new Vite project configured for Cloudflare Workers using `create-cloudflare`:

```bash
$ npm create cloudflare@latest my-vite-app -- --framework=react
```

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we should be pushing users towards React in the Vite docs. We could include React and Vue (arguably we should add SPA templates for more frameworks) or omit this section.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think once we support other frameworks in create cloudflare we could come back to this. Vite's choice on whether we should make this example more generic for now.

We should absolutely get a Vite example with another framework in create cloudflare though.


The Cloudflare Vite plugin supports the full [Cloudflare Developer Platform](https://developers.cloudflare.com/workers/), including KV, D1, Durable Objects, Workflows, and more. Learn more in the [Cloudflare Vite Plugin documentation](https://developers.cloudflare.com/workers/vite-plugin/).

### Cloudflare Pages
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to include Pages still? I think this guide is mainly geared towards users deploying for the first time.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think once we have autoconfig working in GA with Vite static sites we can remove this. That would be the equivalent.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When should the (first-time) user choose Pages over Workers? If it's only for existing users, I think it should be removed. If it's for Git integration (until implemented to Workers), I think we should have "Cloudflare Workers via Wrangler" section and "Cloudflare Pages with Git" section.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So this is a little complex and we're arguably not helping ourselves here.

Cloudflare Pages is a still supported product that is seeing no further development.

We are bringing all the features that Pages is popular for into Workers. At some point in the future it's likely the two products will merge but only at the point where we are at full parity and there is a Pages-equivalent experience in Workers.

For the purposes of this guide, Workers has a git integration and you can start with a project from git. However, right now you need a wrangler configuration file for a Worker to be deployed. We have work due for release this quarter that will (for the most part) remove that requirement by automatically generating it when you link a repository.

Ideally, if you're a knowledgeable user, and you want to get the most out of Vite, our best platform is Workers and will continue to be Workers. Perhaps that means that we should drop the Pages section entirely. The only case in which Pages is better for you is if you just want to deploy and forget about it, which as said we aim to rectify through automatic configuration this quarter.

Copy link
Contributor

@teemingc teemingc Jan 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi from the SvelteKit team 👋🏼 we're wondering if we should also try to steer users towards Workers by adding a note in the Cloudflare Pages section of https://svelte.dev/docs/kit/adapter-cloudflare

MattieTK and others added 4 commits January 14, 2026 22:32
Co-authored-by: James Opstad <13586373+jamesopstad@users.noreply.github.com>
Co-authored-by: James Opstad <13586373+jamesopstad@users.noreply.github.com>
Co-authored-by: James Opstad <13586373+jamesopstad@users.noreply.github.com>
- Remove 'Create a new app' section to avoid framework bias
- Simplify setup instructions by removing numbered list
- Add minimal backend API example showing Worker with /api/ route
- Demonstrate API runs in dev server and deploys with frontend
- Link to full tutorial for complete walkthrough
@sapphi-red sapphi-red added the documentation Improvements or additions to documentation label Jan 20, 2026

The Cloudflare Vite plugin supports the full [Cloudflare Developer Platform](https://developers.cloudflare.com/workers/), including KV, D1, Durable Objects, Workflows, and more. Learn more in the [Cloudflare Vite Plugin documentation](https://developers.cloudflare.com/workers/vite-plugin/).

### Cloudflare Pages
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When should the (first-time) user choose Pages over Workers? If it's only for existing users, I think it should be removed. If it's for Git integration (until implemented to Workers), I think we should have "Cloudflare Workers via Wrangler" section and "Cloudflare Pages with Git" section.

@sapphi-red sapphi-red changed the title docs: improve Cloudflare documentation to highlight Workers docs(static-deploy): improve Cloudflare documentation to highlight Workers Jan 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants