Skip to content

Commit 19a980f

Browse files
committed
Improved overview and get started
1 parent 2f5b790 commit 19a980f

File tree

4 files changed

+28
-5
lines changed

4 files changed

+28
-5
lines changed

src/content/docs/workers/vite-plugin/get-started.mdx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ description: Get started with the Vite plugin
99

1010
import { PackageManagers, WranglerConfig } from "~/components";
1111

12+
:::note
13+
This guide demonstrates creating a standalone Worker from scratch.
14+
{/* Add link to React Router framework guide */}If you would instead like to create a new application from a ready-to-go template, refer to the [React](/workers/frameworks/framework-guides/react/) or [Vue](/workers/frameworks/framework-guides/vue/) framework guides.
15+
:::
16+
1217
### Start with a basic `package.json`
1318

1419
```json
@@ -20,7 +25,8 @@ import { PackageManagers, WranglerConfig } from "~/components";
2025
"scripts": {
2126
"dev": "vite",
2227
"build": "vite build",
23-
"preview": "vite preview"
28+
"preview": "vite preview",
29+
"deploy": "wrangler deploy"
2430
}
2531
}
2632
```
@@ -70,4 +76,4 @@ export default {
7076
};
7177
```
7278

73-
You can now develop (`vite dev`), build (`vite build`), preview (`vite preview`), and deploy (`wrangler deploy`) your application.
79+
You can now develop (`npm run dev`), build (`npm run build`), preview (`npm run preview`), and deploy (`npm run deploy`) your application.

src/content/docs/workers/vite-plugin/index.mdx

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,24 @@ Your Worker code runs inside [workerd](https://github.com/cloudflare/workerd), m
1212

1313
### Features
1414

15+
- Uses the Vite [Environment API](https://vite.dev/guide/api-environment) to integrate Vite with the Workers runtime
1516
- Provides direct access to Workers runtime APIs and bindings
16-
- Supports Workers Assets, enabling you to build static sites, SPAs, and full-stack applications
17+
- Builds your front-end assets for deployment to Cloudflare, enabling you to build static sites, SPAs, and full-stack applications
18+
- Official support for [React Router v7](https://reactrouter.com/) with server-side rendering
1719
- Leverages Vite's hot module replacement for consistently fast updates
1820
- Supports `vite preview` for previewing your build output in the Workers runtime prior to deployment
21+
22+
### Use cases
23+
24+
- React Router v7 (support for more full-stack frameworks is coming soon)
25+
- Single-page applications (SPAs), with or without an integrated backend API
26+
- Standalone Workers
27+
- Multi-Worker applications
28+
29+
### Get started
30+
31+
{/* Add link to React Router framework guide */}To create a new application from a ready-to-go template, refer to the [React](/workers/frameworks/framework-guides/react/) or [Vue](/workers/frameworks/framework-guides/vue/) framework guides.
32+
33+
To create a standalone Worker from scratch, refer to [Get started](./get-started/).
34+
35+
For a more in-depth look at adapting an existing Vite project and an introduction to key concepts, refer to the [Tutorial](./tutorial/).

src/content/docs/workers/vite-plugin/migrating-from-wrangler-dev.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,4 @@ See [Vite Environments](../vite-environments/) for more information about config
3333
### Local only data during local development
3434

3535
The Vite plugin does not support [remote mode](/workers/local-development/#develop-using-remote-resources-and-bindings).
36-
We will be adding support for accessing remote resources in local development in the future.
36+
We will be adding support for accessing remote resources in local development in a future update.

src/content/docs/workers/vite-plugin/tutorial.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
pcx_content_type: tutorial
3-
title: Tutorial - React SPA
3+
title: Tutorial - React SPA with an API
44
head: []
55
sidebar:
66
order: 2

0 commit comments

Comments
 (0)