TailwindCSS plugins installation issue

Hello,

I'm trying to install Tailwindcss plugin but I'm getting an error of "require is not defined".

Here is my Tailwindcss config file

/** @type {import('tailwindcss').Config} */
export default {
  content: ['./resources/views/**/*.edge', './node_modules/flowbite/**/*.js'],
  theme: {
    extend: {
      colors: {
        primary: '#030075',
        buttons: '#5453F9',
        secondary: '#50E2D5',
      },
    },
  },
  plugins: [require('@tailwindcss/forms'), require('flowbite/plugin')],
}
Copied!

Join The Discussion! (1 Replies)

Please sign in or sign up for free to join in on the dicussion.

  1. Commented 11 days ago
    /** @type {import('tailwindcss').Config} */
    
    import tailwindForm from '@tailwindcss/forms'
    import flowbite from 'flowbite/plugin'
    
    export default {
      content: ['./resources/views/**/*.edge', './node_modules/flowbite/**/*.js'],
      theme: {
        extend: {
          colors: {
            primary: '#030075',
            buttons: '#5453F9',
            secondary: '#50E2D5',
          },
        },
      },
      plugins: [tailwindForm, flowbite],
    }
    Copied!

    replace the required with import

    1

    Please sign in or sign up for free to reply