Skip to content

TailwindCSS

@vituum/vite-plugin-tailwindcss

Adds out of the box support for TailwindCSS to your project. Including base PostCSS plugins from @vituum/vite-plugin-postcss

See docs for more info about TailwindCSS

Install

npm

bash
npm i @vituum/vite-plugin-tailwindcss --save-dev
npm i @vituum/vite-plugin-tailwindcss --save-dev

yarn

bash
yarn add @vituum/vite-plugin-tailwindcss -D
yarn add @vituum/vite-plugin-tailwindcss -D

Config

javascript
import tailwindcss from '@vituum/vite-plugin-tailwindcss'

export default {
    plugins: [tailwindcss()]
}
import tailwindcss from '@vituum/vite-plugin-tailwindcss'

export default {
    plugins: [tailwindcss()]
}

Options

tailwindcss

  • Type: Object
  • Default: {}

TailwindCSS configuration options. Can be used instead of tailwind.config.js.

import

  • Type: Object
  • Default: {}

PostCSS [postcss-import](https://www.npmjs.com/package/postcss-import plugin options.

nesting

  • Type: Object
  • Default: {}

PostCSS postcss-nesting plugin options.

customMedia

  • Type: Object
  • Default: {}

PostCSS postcss-custom-media plugin options.

autoprefixer

  • Type: Object
  • Default: {}

PostCSS autoprefixer plugin options.

Released under the MIT License.