Package Exports
- @nuxtjs/tailwindcss
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@nuxtjs/tailwindcss) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme

TailwindCSS module for Nuxt.js with nuxt-purgecss + modern css ⚡️
Infos
Setup
- Add
@nuxtjs/tailwindcssdependency to your project
npm install --save-dev @nuxtjs/tailwindcss # or yarn add --dev @nuxtjs/tailwindcss- Add
@nuxtjs/tailwindcssto thebuildModulessection ofnuxt.config.js
⚠️ If you are using Nuxt < 2.9.0, use modules instead.
{
buildModules: [
'@nuxtjs/tailwindcss'
]
}Usage
This module will automatically create two files in your srcDir:
~/tailwind.config.js~/assets/css/tailwind.css
It will also inject the CSS file globally and configure nuxt-purgecss and postcss-preset-env to stage 1.
Configuration
If you want to set a different path for the configuration file or css file, you can use these given options:
// nuxt.config.js
{
buildModules: [
'@nuxtjs/tailwindcss'
],
tailwindcss: {
configPath: '~/config/tailwind.config.js',
cssPath: '~/assets/css/tailwind.css'
}
}If you want to set any (additional) purgeCSS configuration options, you can add a purgeCSS configuration object:
// nuxt.config.js
{
purgeCSS: {
whitelist: ['css-selector-to-whitelist'],
},
}See full options here: https://github.com/Developmint/nuxt-purgecss#options
Development
- Clone this repository
- Install dependencies using
yarn installornpm install - Start development server using
npm run dev
License
Copyright (c) Nuxt.js Team