# Tailwind on Vite 8

> Vite 8, React 19 and Tailwind CSS 4, with rolldown, lightningcss and Tailwind’s oxide scanner running as WebAssembly.

Live: https://clientvm.joeldsouza.me/demos/vite8-tailwind/ (Chromium) · Source: https://github.com/Reflex-Gravity/client-vm/tree/main/test/fixtures/vite8-tailwind

Vite 8 and Tailwind 4 lean on native binaries: rolldown for bundling, lightningcss for CSS, and Tailwind’s oxide scanner. ClientVM swaps each for its official WebAssembly build of the same version, downloaded and integrity-checked on first use, so the project needs no changes.

The package.json and lockfile are the ones the end-to-end tests install. Edit a class in App.jsx and the scanner finds it; Vite hot-reloads the CSS.

## How it's built

```ts
const app = await vm.createInstance({ fs: { from: { home: { user: { app: project } } } } });

app.onPortOpen((port, url) => (preview.src = url));
// native rolldown, lightningcss and oxide are swapped for their WebAssembly builds
await app.exec('npm install && npm run dev', { cwd: '/home/user/app' });
```

## Try

- swap the colour: `sed -i 's/emerald/rose/g' src/App.jsx && grep -c rose src/App.jsx`
- add a class: `sed -i 's/rounded-2xl bg-white/rounded-2xl bg-white -rotate-2/' src/App.jsx`
- build: `npx vite build`
- list the build: `ls -la dist/assets`
- stand-ins: `ls /usr/local/lib/clientvm/standins`

## Built with

Vite 8, React 19, Tailwind CSS 4, WebAssembly

## Docs

- [WebAssembly stand-ins](https://clientvm.joeldsouza.me/docs/decisions/0013-wasm-stand-ins-for-native-packages/)
- [Compatibility](https://clientvm.joeldsouza.me/docs/compatibility/)
