Skip to content
This repository has been archived by the owner on May 8, 2021. It is now read-only.

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Nuxt

Setting up Tailwind with NuxtJS is really simple, just add the @nuxtjs/tailwindcss module:

npm install @nuxtjs/tailwindcss

Then add it to your nuxt.config.js file:

export default {
  modules: [
    '@nuxtjs/tailwindcss'
  ]
}

That's it ✨

The module will:

  • Create a CSS file for your Tailwind styles in assets/css/tailwind.css:
@tailwind base;
@tailwind components;
@tailwind utilities;
  • Import this file as global css
  • Create a tailwind.config.js file.
module.exports = {
  theme: {},
  variants: {},
  plugins: []
}

Project setup

npm install

Compiles and hot-reloads for development

npm run dev

Compiles and minifies for production

npm run build

Start the server for production

npm run start

Generate as a static website

npm run generate