You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/content/docs/workers/frameworks/framework-guides/hono.mdx
+4-3Lines changed: 4 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,7 @@ import {
16
16
FileTree,
17
17
} from"~/components";
18
18
19
-
**Start from CLI** - scaffold a full-stack app with a Hono API, React SPA and the Cloudflare Vite plugin for lightning-fast development.
19
+
**Start from CLI** - scaffold a full-stack app with a Hono API, React SPA and the [Cloudflare Vite plugin](/workers/vite-plugin/) for lightning-fast development.
20
20
21
21
<PackageManagers
22
22
type="create"
@@ -63,18 +63,19 @@ With Workers Assets, you can easily combine a Hono API running on Workers with a
63
63
- `assets.not_found_handling` is set to `single-page-application`, which means that routes that are handled by your SPA do not go to the Worker, and are thus free.
64
64
- If you want to add bindings to resources on Cloudflare's developer platform, you configure them here. Read more about [bindings](/workers/runtime-apis/bindings/).
65
65
66
-
`vite.config.ts` is set up to use the Cloudflare Vite plugin. This runs your Worker in the Cloudflare Workers runtime, ensuring your local development environment is as close to production as possible.
66
+
`vite.config.ts` is set up to use the [Cloudflare Vite plugin](/workers/vite-plugin/). This runs your Worker in the Cloudflare Workers runtime, ensuring your local development environment is as close to production as possible.
67
67
68
68
`src/worker/index.ts` is your Hono app, which contains a single endpoint to begin with, `/api`.
69
69
At `src/react-app/src/App.tsx`, your React app calls this endpoint to get a message back and displays this in your SPA.
70
70
</Details>
71
71
72
-
2.**Develop locally with the Cloudflare Vite plugin**
72
+
2.**Develop locally with the [Cloudflare Vite plugin](/workers/vite-plugin/)**
73
73
74
74
After creating your project, run the following command in your project directory to start a local development server.
75
75
<PackageManagerstype="run"args="dev" />
76
76
<Detailsheader="What's happening in local development?">
77
77
This project uses Vite for local development and build, and thus comes with all of Vite's features, including hot module replacement (HMR).
78
+
78
79
In addition, `vite.config.ts` is set up to use the Cloudflare Vite plugin. This runs your application in the Cloudflare Workers runtime, just like in production, and enables access to local emulations of bindings.
Copy file name to clipboardExpand all lines: src/content/docs/workers/frameworks/framework-guides/react.mdx
+4-3Lines changed: 4 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,7 @@ import {
16
16
Steps,
17
17
} from"~/components";
18
18
19
-
**Start from CLI** - scaffold a full-stack app with a React SPA, Cloudflare Workers API, and the Cloudflare Vite plugin for lightning-fast development.
19
+
**Start from CLI** - scaffold a full-stack app with a React SPA, Cloudflare Workers API, and the [Cloudflare Vite plugin](/workers/vite-plugin/) for lightning-fast development.
20
20
21
21
<PackageManagers
22
22
type="create"
@@ -62,18 +62,19 @@ import {
62
62
-`assets.not_found_handling` is set to `single-page-application`, which means that routes that are handled by your React SPA do not go to the Worker, and are thus free.
63
63
- If you want to add bindings to resources on Cloudflare's developer platform, you configure them here. Read more about [bindings](/workers/runtime-apis/bindings/).
64
64
65
-
`vite.config.ts` is set up to use the Cloudflare Vite plugin. This runs your Worker in the Cloudflare Workers runtime, ensuring your local development environment is as close to production as possible.
65
+
`vite.config.ts` is set up to use the [Cloudflare Vite plugin](/workers/vite-plugin/). This runs your Worker in the Cloudflare Workers runtime, ensuring your local development environment is as close to production as possible.
66
66
67
67
`worker/index.ts` is your backend API, which contains a single endpoint, `/api/`, that returns a text response.
68
68
At `src/App.tsx`, your React app calls this endpoint to get a message back and displays this.
69
69
</Details>
70
70
71
-
2.**Develop locally with the Cloudflare Vite plugin**
71
+
2.**Develop locally with the [Cloudflare Vite plugin](/workers/vite-plugin/)**
72
72
73
73
After creating your project, run the following command in your project directory to start a local development server.
74
74
<PackageManagerstype="run"args="dev" />
75
75
<Detailsheader="What's happening in local development?">
76
76
This project uses Vite for local development and build, and thus comes with all of Vite's features, including hot module replacement (HMR).
77
+
77
78
In addition, `vite.config.ts` is set up to use the Cloudflare Vite plugin. This runs your application in the Cloudflare Workers runtime, just like in production, and enables access to local emulations of bindings.
Copy file name to clipboardExpand all lines: src/content/docs/workers/frameworks/framework-guides/vue.mdx
+6-4Lines changed: 6 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -49,22 +49,24 @@ To use `create-cloudflare` to create a new Vue project with <InlineBadge preset=
49
49
- `assets.not_found_handling` is set to `single-page-application`, which means that routes that are handled by your Vue SPA do not go to the Worker, and are thus free.
50
50
- If you want to add bindings to resources on Cloudflare's developer platform, you configure them here. Read more about [bindings](/workers/runtime-apis/bindings/).
51
51
52
-
`vite.config.ts` is set up to use the Cloudflare Vite plugin. This runs your Worker in the Cloudflare Workers runtime, ensuring your local development environment is as close to production as possible.
52
+
`vite.config.ts` is set up to use the [Cloudflare Vite plugin](/workers/vite-plugin/). This runs your Worker in the Cloudflare Workers runtime, ensuring your local development environment is as close to production as possible.
53
53
54
54
`server/index.ts` is your backend API, which contains a single endpoint, `/api/`, that returns a text response.
55
55
At `src/App.vue`, your Vue app calls this endpoint to get a message back and displays this.
56
56
</Details>
57
57
58
-
## 2. Develop locally
58
+
## **Develop locally with the [Cloudflare Vite plugin](/workers/vite-plugin/)**
59
59
60
60
After you have created your project, run the following command in the project directory to start a local server. This will allow you to preview your project locally during development.
61
61
62
62
<PackageManagerstype="run"args={"dev"} />
63
63
<Detailsheader="What's happening in local development?">
64
64
This project uses Vite for local development and build, and thus comes with
65
65
all of Vite's features, including hot module replacement (HMR). In addition,
66
-
`vite.config.ts` is set up to use the Cloudflare Vite plugin.
67
-
This runs your application in the Cloudflare Workers runtime, just like in production, and enables access to local emulations of bindings.
66
+
`vite.config.ts` is set up to use the [Cloudflare Vite
67
+
plugin](/workers/vite-plugin/). This runs your application in the Cloudflare
68
+
Workers runtime, just like in production, and enables access to local
0 commit comments