flowbite icon indicating copy to clipboard operation
flowbite copied to clipboard

Error in Tailwind Config for Charts

Open geraldmacasaet opened this issue 2 years ago • 3 comments

I am trying to follow the installation from this link for the Charts Tailwind CSS Chart - Flowbite

and tried adding plugins: [ require('flowbite/plugin')({ charts: true, }), // ... other plugins ]

but I got this error

[plugin:vite:css] [postcss] require(...) is not a function

geraldmacasaet avatar Aug 10 '23 15:08 geraldmacasaet

I ran into a similar issue using require with TypeScript. I resolved it by using import like this:

import flowbitePlugin from 'flowbite/plugin';

...

  plugins: [
    flowbitePlugin, // require Flowbite's plugin for Tailwind CSS
  ],

awhitford avatar Aug 27 '23 21:08 awhitford

Although the provided code resolved the issue, it still did not include the charts plugin.

samuelna avatar Jan 31 '24 20:01 samuelna