|
| 1 | +--- |
| 2 | +title: TanStack Start |
| 3 | +description: Deploy TanStack Start (Cloudflare template) to Zephyr by adding the Zephyr TanStack Start Vite plugin. |
| 4 | +head: |
| 5 | + - - meta |
| 6 | + - property: og:description |
| 7 | + content: Deploy TanStack Start (Cloudflare template) to Zephyr by adding the Zephyr TanStack Start Vite plugin. |
| 8 | +--- |
| 9 | + |
| 10 | +import { PackageManagerTabs } from '@rspress/core/theme'; |
| 11 | +import BuildAuthInfo from '../../components/build-auth-info.mdx'; |
| 12 | + |
| 13 | +# TanStack Start |
| 14 | + |
| 15 | +If you created your app with the **TanStack Start CLI** and selected the **Cloudflare** deployment option, deploying to Zephyr is just adding the Zephyr TanStack Start plugin to your Vite build. |
| 16 | + |
| 17 | +For the upstream CLI flow, see TanStack’s docs: **[TanStack Start (React) Quick Start](https://tanstack.com/start/latest/docs/framework/react/quick-start)**. |
| 18 | + |
| 19 | +For Cloudflare-specific setup details (Wrangler config, Cloudflare Vite plugin, etc.), see: **[Cloudflare Workers: TanStack Start](https://developers.cloudflare.com/workers/framework-guides/web-apps/tanstack-start/)**. |
| 20 | + |
| 21 | +:::info Prerequisites |
| 22 | + |
| 23 | +- Finished our [Prerequisites](/getting-started/installation) setup guide |
| 24 | +- Your organization is using **Zephyr’s managed Cloudflare integration** (the default integration) |
| 25 | + |
| 26 | +::: |
| 27 | + |
| 28 | +## Install |
| 29 | + |
| 30 | +Add the plugin to your project: |
| 31 | + |
| 32 | +<PackageManagerTabs command="add -D vite-plugin-tanstack-start-zephyr" /> |
| 33 | + |
| 34 | +## Configure Vite |
| 35 | + |
| 36 | +In your `vite.config.ts`, import `withZephyrTanstackStart` and add it to the **end** of your `plugins` array (after TanStack Start): |
| 37 | + |
| 38 | +```ts filename="vite.config.ts" |
| 39 | +import { withZephyrTanstackStart } from 'vite-plugin-tanstack-start-zephyr'; |
| 40 | + |
| 41 | +export default defineConfig({ |
| 42 | + plugins: [ |
| 43 | + // ...your existing plugins (cloudflare(), tanstackStart(), react(), etc.) |
| 44 | + withZephyrTanstackStart(), |
| 45 | + ], |
| 46 | +}); |
| 47 | +``` |
| 48 | + |
| 49 | +:::warning Git is required |
| 50 | + |
| 51 | +Zephyr derives your **Application UID** from your `package.json` and git context. Make sure your repo is initialized and has a remote (for example, GitHub). |
| 52 | + |
| 53 | +::: |
| 54 | + |
| 55 | +## Deploy |
| 56 | + |
| 57 | +Run your production build: |
| 58 | + |
| 59 | +```bash filename="Terminal" |
| 60 | +npm run build |
| 61 | +``` |
| 62 | + |
| 63 | +On the first run, you’ll be prompted to authenticate: |
| 64 | + |
| 65 | +<BuildAuthInfo /> |
| 66 | + |
| 67 | +## SSR Worker (beta) |
| 68 | + |
| 69 | +TanStack Start deployments on Zephyr use our **SSR Worker** runtime. |
| 70 | + |
| 71 | +- This is currently **beta** and **only available on Cloudflare** |
| 72 | +- It is **only available on Zephyr’s default (managed) Cloudflare integration** |
| 73 | +- It is **not available on Bring Your Own Cloud (BYOC)** deployments |
| 74 | + |
| 75 | +Learn more: **[SSR Worker (beta)](/reference/ssr-worker)**. |
0 commit comments