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
### Add Cloudflare scripts to the `package.json` file
60
-
61
-
Add the following scripts to your `package.json` file:
62
-
63
-
```json
64
-
"deploy": "wrangler deploy",
65
-
"cf-typegen": "wrangler types"
66
-
```
67
-
68
-
-`deploy`: used to deploy your application after you have built it
69
-
70
-
-`cf-typegen`: used to generate Cloudflare TypeScript types for your project based on your configuration
71
-
72
-
Note that there are already three relevant scripts that the TanStack CLI defined for you: `dev`, `build` and `serve`, which respectively allow you to start a local Vite dev server
73
-
to develop locally your application, build your application (so that it can be deployed) and start a local preview server that you can use to validate your built application
74
-
before deploying it.
75
-
76
-
### Update the `vite.config.ts` file
77
-
78
-
Next you need to update update the Vite configuration file to use the Cloudflare plugin:
79
-
80
-
```diff lang="ts"
81
-
import { defineConfig } from 'vite'
82
-
import { tanstackStart } from '@tanstack/react-start/plugin/vite'
83
-
import viteReact from '@vitejs/plugin-react'
84
-
import viteTsConfigPaths from 'vite-tsconfig-paths'
85
-
import tailwindcss from '@tailwindcss/vite'
86
-
+import { cloudflare } from '@cloudflare/vite-plugin';
0 commit comments