themesberg / flowbite

Open-source UI component library and front-end development framework based on Tailwind CSS
https://flowbite.com
MIT License
7.61k stars 715 forks source link

When I add `require('flowbite/plugin')` for `tailwind.config.js`, I got these errors: The safelist pattern `/^apexcharts-.*$/` doesn't match any Tailwind CSS classes. #628

Closed PublicWorld closed 1 year ago

PublicWorld commented 1 year ago
warn - The safelist pattern `/^apexcharts-.*$/` doesn't match any Tailwind CSS classes.
warn - Fix this pattern or remove it from your `safelist` configuration.
warn - https://tailwindcss.com/docs/content-configuration#safelisting-classes

image

and this is dependencies of package.json: image

andreigherghe commented 1 year ago

Just ran npm update and started having this issue as well.

zoltanszogyenyi commented 1 year ago

Hey peeps,

Does this break the project or is it just a warning? I'll take a look at it tomorrow.

Thanks!

andreigherghe commented 1 year ago

It doesn't break the project, it's just a warning. Thank you!

zoltanszogyenyi commented 1 year ago

Got me a bit worried :)

Should be an easy conditional fix, it's part of our new charts update and adding the regex safelist is an easy way to apply the classes automatically for the charts.

Will patch it in v1.8.1.

Ignore the warning until then, it shouldn't affect anything in terms of performance afaik.

zoltanszogyenyi commented 1 year ago

Peeps, please update to v1.8.1 and check if it still shows the warning:

https://github.com/themesberg/flowbite/releases/tag/v1.8.1

We now conditionally check if you have charts set to true: https://github.com/themesberg/flowbite/blob/main/plugin.js#L826

Thanks!

andreigherghe commented 1 year ago

@zoltanszogyenyi Thank you so much! The warning is no longer present. 😃

zoltanszogyenyi commented 1 year ago

Awesome, thank you all!