Starter using Vite + React + Tailwind CSS 2

  • By Robert Soriano
  • Last update: Dec 5, 2022
  • Comments: 1

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:

  1. Install @tailwindcss/ui:
yarn add @tailwindcss/ui
  1. 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

Github

https://github.com/wobsoriano/vite-react-tailwind-starter

Comments(1)

  • 1

    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.