Vite + React + Tailwind CSS starter
Inspired by posva's vite-tailwind-starter
Note if you have access to Tailwind UI, you can follow the following steps to add it:
- Install
@tailwindcss/ui
:
yarn add @tailwindcss/ui
- Add the plugin in
tailwind.config.js
without changing anything else:
// tailwind.config.js
module.exports = {
// ...
// rest of the config
plugins: [require('@tailwindcss/ui')],
}
Installation
yarn
Development
yarn dev
Build
yarn build
Update dependencies + add Tailwind JIT plugin
update vite to latest remove '@pika' dependency and change it to 'react' and 'react-dom' remove 'vite-plugin-react' and change it to official vitejs react plugin '@vitejs/plugin-react-refresh' basically the same as vite react template.
also add Tailwind JIT.