Skip to main content


👻 Primitive and flexible state management for React
Go to Latest
---title: Vitedescription: How to use Jotai with Vitenav: 7.99keywords: vitepublished: false---
You can use the plugins from the `jotai/babel` bundle to enhance your developer experience when using Vite and Jotai.
In your `vite.config.ts`:
```jsimport { defineConfig } from 'vite'import react from '@vitejs/plugin-react'import jotaiDebugLabel from 'jotai/babel/plugin-debug-label'import jotaiReactRefresh from 'jotai/babel/plugin-react-refresh'
// default defineConfig({ plugins: [ react({ babel: { plugins: [jotaiDebugLabel, jotaiReactRefresh] } }), ], // ... The rest of your configuration})```
There's a template below to try it yourself.
## Examples
### Vite Template
<Stackblitz id="vitejs-vite-xhhxve" file="vite.config.ts" />