Skip to content

TanStack Start

TanStack Start builds with Vite, so it takes @hozo/vite.

To see the result before setting anything up, open the finished project in StackBlitz. It runs in the browser using the WebAssembly build of the compiler. The same project is on GitHub to copy with npx degit iray-tno/hozo/templates/tanstack-start my-app.

sh
npm install --save-dev @hozo/vite @hozo/compilernpm install @hozo/core

The plugin goes first in the list, before any plugin that transforms the source:

ts
import { hozo } from '@hozo/vite'export default defineConfig({  plugins: [hozo({ css: 'src/theme.css' }), tanstackStart(), viteReact(), nitro()],})

TanStack’s starters add Tailwind through @tailwindcss/vite, with src/styles/app.css importing it. Point css at that stylesheet, put hozo() before tailwindcss(), and turn Hozo’s preflight off, since Tailwind already emits one:

ts
export default defineConfig({  plugins: [    hozo({ css: 'src/styles/app.css', preflight: false }),    tailwindcss(),    tanstackStart(),    viteReact(),    nitro(),  ],})