Vite Guide

How to set up Tamagui with Vite

Tamagui now has two plugins for Vite: one that sets up everything you need to get going, and a second that adds CSS compilation. Both are included in the @tamagui/vite-plugin package.

For a full-featured example, you can reference the experimental site written using vite .


Add @tamagui/vite-plugin and update your vite.config.ts:

import { tamaguiExtractPlugin, tamaguiPlugin } from '@tamagui/vite-plugin'
export default defineConfig({
plugins: [
config: './src/tamagui.config.ts',
components: ['tamagui'],
// optional, adds the optimizing compiler:

See the /docs/intro/installation and /docs/core/configuration docs for more on generally setting up Tamagui.