[Vuejs]-Nuxt + Tailwind: My tailwind.config.js file has no effect and default config is used instead

0👍

Did you register tailwindcss in the buildModules of the nuxt.config.js (and not modules) ?

  buildModules: [
    // https://go.nuxtjs.dev/tailwindcss
    '@nuxtjs/tailwindcss'
  ],

Can you add some of your code to help troubleshoot ?

  • package.json
  • nuxt.config.js
  • tailwind.config.js

What are you trying to change inside the tailwind config ?
The Nuxt module for Tailwind CSS is using v1.9.6 and not the latest v.2.0.3, so some things you try to change in your config file following the docs are maybe not possible with the current nuxt package.

You can upgrade to latest Tailwind version :
https://stackoverflow.com/a/30650609/13541914

yarn add --dev tailwindcss@npm:@tailwindcss/postcss7-compat postcss@^7 autoprefixer@^9

-1👍

All I did was add a tailwind.config.js file.

Hope it helps

👤Daniel

Leave a comment