Skip to content

Conversation

@jamesopstad
Copy link
Contributor

@jamesopstad jamesopstad commented Mar 3, 2025

Summary

Documentation for the Vite plugin

Screenshots (optional)

Documentation checklist

  • The documentation style guide has been adhered to.
  • If a larger change - such as adding a new page- an issue has been opened in relation to any incorrect or out of date information that this PR fixes.
  • Files which have changed name or location have been allocated redirects.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 3, 2025

Howdy and thanks for contributing to our repo. We review internal PRs within 1 week. If it's something urgent or has been sitting without a comment, start a thread in the Developer Docs space internally.

Copy link
Contributor

@hyperlint-ai hyperlint-ai bot left a comment

Choose a reason for hiding this comment

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

Hyperlint Review is complete!

Hyperlint Vale Style Guide Review

Reviewed 7 files and found 2 issues.

See the inline comments and suggestions below.

Hyperlint Link Check Review

Reviewed 7 files and found 0 issues.


We are upgrading our reviewer model! Going forward, our model will learn your particular style - which comments you all accept and reject, so that it can further personalize its suggestions.

What is Hyperlint?

Hyperlint is an AI agent that helps you write, edit, and maintain your documentation. It can review, edit, and suggest fixes for your documentation.

Learn more about the Hyperlint AI reviewer and the checks that we can run on your documentation.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 3, 2025

Preview URL: https://7a97b8b7.preview.developers.cloudflare.com
Preview Branch URL: https://james-vite-plugin-docs.preview.developers.cloudflare.com

Files with changes (up to 15)

Original Link Updated Link
https://developers.cloudflare.com/workers/vite-plugin/tutorial/ https://james-vite-plugin-docs.preview.developers.cloudflare.com/workers/vite-plugin/tutorial/
https://developers.cloudflare.com/workers/vite-plugin/reference/cloudflare-environments/ https://james-vite-plugin-docs.preview.developers.cloudflare.com/workers/vite-plugin/reference/cloudflare-environments/
https://developers.cloudflare.com/workers/vite-plugin/get-started/ https://james-vite-plugin-docs.preview.developers.cloudflare.com/workers/vite-plugin/get-started/
https://developers.cloudflare.com/workers/vite-plugin/reference/api/ https://james-vite-plugin-docs.preview.developers.cloudflare.com/workers/vite-plugin/reference/api/
https://developers.cloudflare.com/workers/vite-plugin/reference/vite-environments/ https://james-vite-plugin-docs.preview.developers.cloudflare.com/workers/vite-plugin/reference/vite-environments/
https://developers.cloudflare.com/workers/vite-plugin/reference/debugging/ https://james-vite-plugin-docs.preview.developers.cloudflare.com/workers/vite-plugin/reference/debugging/
https://developers.cloudflare.com/workers/vite-plugin/reference/static-assets/ https://james-vite-plugin-docs.preview.developers.cloudflare.com/workers/vite-plugin/reference/static-assets/
https://developers.cloudflare.com/workers/vite-plugin/ https://james-vite-plugin-docs.preview.developers.cloudflare.com/workers/vite-plugin/
https://developers.cloudflare.com/workers/vite-plugin/reference/migrating-from-wrangler-dev/ https://james-vite-plugin-docs.preview.developers.cloudflare.com/workers/vite-plugin/reference/migrating-from-wrangler-dev/
https://developers.cloudflare.com/workers/vite-plugin/reference/secrets/ https://james-vite-plugin-docs.preview.developers.cloudflare.com/workers/vite-plugin/reference/secrets/
https://developers.cloudflare.com/workers/vite-plugin/reference/ https://james-vite-plugin-docs.preview.developers.cloudflare.com/workers/vite-plugin/reference/

@irvinebroque irvinebroque requested a review from korinne March 4, 2025 05:55
@jamesopstad jamesopstad force-pushed the james/vite-plugin-docs branch from faa371a to c401edd Compare April 2, 2025 08:53
@hyperlint-ai
Copy link
Contributor

hyperlint-ai bot commented Apr 2, 2025

Howdy and thanks for contributing to our repo. The Cloudflare team reviews new, external PRs within two (2) weeks. If it's been two weeks or longer without any movement, please tag the PR Assignees in a comment.

We review internal PRs within 1 week. If it's something urgent or has been sitting without a comment, start a thread in the Developer Docs space internally.


PR Change Summary

Drafted comprehensive documentation for the Vite plugin, enhancing user guidance and integration with Cloudflare environments.

  • Added detailed API documentation for the Vite plugin.
  • Introduced guides for using Cloudflare environments with the Vite plugin.
  • Provided debugging instructions for local development with the Vite plugin.
  • Created a tutorial for building a React SPA with an API Worker using the Vite plugin.

Added Files

  • src/content/docs/workers/vite-plugin/api.mdx
  • src/content/docs/workers/vite-plugin/cloudflare-environments.mdx
  • src/content/docs/workers/vite-plugin/debugging.mdx
  • src/content/docs/workers/vite-plugin/get-started.mdx
  • src/content/docs/workers/vite-plugin/index.mdx
  • src/content/docs/workers/vite-plugin/migrating-from-wrangler-dev.mdx
  • src/content/docs/workers/vite-plugin/secrets.mdx
  • src/content/docs/workers/vite-plugin/static-assets.mdx
  • src/content/docs/workers/vite-plugin/tutorial.mdx
  • src/content/docs/workers/vite-plugin/vite-environments.mdx

How can I customize these reviews?

Check out the Hyperlint AI Reviewer docs for more information on how to customize the review.

If you just want to ignore it on this PR, you can add the hyperlint-ignore label to the PR. Future changes won't trigger a Hyperlint review.

Note specifically for link checks, we only check the first 30 links in a file and we cache the results for several hours (for instance, if you just added a page, you might experience this). Our recommendation is to add hyperlint-ignore to the PR to ignore the link check for this PR.

@jamesopstad jamesopstad force-pushed the james/vite-plugin-docs branch from c401edd to d89872d Compare April 2, 2025 08:55
@jamesopstad jamesopstad marked this pull request as ready for review April 2, 2025 09:39
Copy link
Contributor

@petebacondarwin petebacondarwin left a comment

Choose a reason for hiding this comment

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

First lot of comments before lunch 😄

Copy link
Contributor

@petebacondarwin petebacondarwin left a comment

Choose a reason for hiding this comment

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

This is looking great! Left a few more comments. I am done now.
Thanks for powering through this @jamesopstad

@jamesopstad jamesopstad force-pushed the james/vite-plugin-docs branch 2 times, most recently from bac5c2b to ab0126f Compare April 3, 2025 15:54
jamesopstad and others added 3 commits April 3, 2025 17:23
Co-authored-by: hyperlint-ai[bot] <154288675+hyperlint-ai[bot]@users.noreply.github.com>
Co-authored-by: hyperlint-ai[bot] <154288675+hyperlint-ai[bot]@users.noreply.github.com>
@jamesopstad jamesopstad force-pushed the james/vite-plugin-docs branch from ab0126f to ddb1c6c Compare April 3, 2025 16:23
@jamesopstad
Copy link
Contributor Author

This is looking great! Left a few more comments. I am done now. Thanks for powering through this @jamesopstad

Thanks for the feedback @petebacondarwin. I've made all the suggested changes except the ones I've left unresolved.


### Use cases

- React Router v7 (support for more full-stack frameworks is coming soon)
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it would be useful to break down the kinds of applications that can be built. Such as:

  • Single-page applications
  • Static sites
  • Server-side rendered applications (The Vite plugin is currently only supported in React Router v7, with more full-stack frameworks support coming soon).

{/* Add docs for _headers and _redirects */}

:::note
The Cloudflare Vite plugin does not support [run_worker_first](/workers/static-assets/binding/#run_worker_first).
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this only when running dev or any other commands? Also, should we call out any nuances with _headers and _redirects ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was going to reference _headers and _redirects but I couldn't find any docs to link to. I've left a comment and can add this in later.

While run_worker_first is technically supported in preview and deploy, I think we'll add a warning against using it because the behaviour in dev would be very different.

Copy link
Contributor

@korinne korinne left a comment

Choose a reason for hiding this comment

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

Left a couple of comments, but they don't need to be addressed before merging. This looks great, thanks James!

Copy link
Collaborator

@kodster28 kodster28 left a comment

Choose a reason for hiding this comment

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

A few broad things. This is good though!

Structural feedback:
I'd prefer that we add a touch more hierarchy here, maybe something like:

Overview
Get started
Tutorial - React SPA
Reference (contains everything else, or at least more of the reference type content)

Writing feedback:

  1. Added a lot of cross links. In most places, we'd prefer you have cross links in context instead of having an additional line like See X for more details.
  2. Code blocks support title="" values. Seems like you could benefit from those across your examples.
  3. Separate runnable commands into their own code block. Really good for copy / paste && actionability.

@jamesopstad jamesopstad merged commit 03c433a into production Apr 4, 2025
11 checks passed
@jamesopstad jamesopstad deleted the james/vite-plugin-docs branch April 4, 2025 07:52
RebeccaTamachiro pushed a commit that referenced this pull request Apr 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

product:workers Related to Workers product size/l

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants