flowbite
flowbite copied to clipboard
Error in Tailwind Config for Charts
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
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
],
Although the provided code resolved the issue, it still did not include the charts plugin.