Skip to content

maliksvd/vite-tailwindcss

Repository files navigation

Vite + Tailwind CSS

A starter kit for my small personal projects requires Vite and Tailwind CSS.

Installation

You can clone this project if you want.

git clone https://github.com/maliksvd/vite-tailwindcss.git

Or install the following dependencies.

Scaffolding Vite Project

yarn create vite

Add latest Tailwind CSS and its peer dependencies

yarn add -D tailwindcss postcss autoprefixer

Run the init command to generate Tailwind CSS file and PostCSS config file.

npx tailwindcss init -p

Edit the Tailwind CSS config file to add path to all of your template files.

module.exports = {
  content: ['./index.html', './src/**/*.{vue,js,ts,jsx,tsx}'],
  theme: {
    extend: {},
  },
  plugins: [],
};

And finally add Prettier for Automatic Class Sorting with Prettier.

yarn add -D prettier prettier-plugin-tailwindcss

Sources

License

MIT

About

A starter project with Vite and Tailwind CSS

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages