Hadi Ahmadi
Hadi Ahmadi

Reputation: 9

How to use TailwindCSS with dynamic content which came from DB?

We are working on a CMS which is based on ASP.NET Core Blazor & TailwindCSS. we've developed multiple blocks using tailwindcss and used tailwind's cdn script for development. but it's performance is not good in lighthouse test. If we add defer or async tags for tailwind's script, initial load of page won't have styles.

Whad do you suggest for our workflow? Should we use static css with common tailwind classes (tailwind v2 approach) or build styles after each time page content changed? or any better idea?

Thanks

We've tried using tailwind's cdn script and it's performance is not good for production use.

Upvotes: 0

Views: 51

Answers (1)

mike
mike

Reputation: 1863

definitely build your styles after each change and publish built pages.

Upvotes: 0

Related Questions