Tailwind CSS Nuxt disable purge option throws error in production

Viewed 728

I'm using @nuxtjs/tailwindcss version 3.4.2 and can't seem to disable the purge CSS option. Seems that this issue is floating around a bit and only seems to occur in production.

What am I doing wrong?

tailwind.config.js

module.exports = {
  purge: {
    enabled: false
  },
  darkMode: false, // or 'media' or 'class'
  theme: {
    extend: {},
  },
  variants: {
    extend: {
      opacity: ['disabled'],
    }
  },
  plugins: [
    require('@tailwindcss/forms')
  ]
}

error

1 Answers

try this.

purge: {
    enabled: process.env.NODE_ENV == 'production',
    content: ['./**/*.vue'],
},
Related