How to use Tailwind.css with PostCSS and PurgeCSS

Hi, I’m trying to use Tailwind.css on a new React and Meteor project that I’m starting but I don’t get PurgeCSS to work correctly, I got Tailwind to work by following this tutorial but now I can’t get PurgeCSS to work with it, this is my postcss config on my package.json:

"postcss": {
    "plugins": {
      "postcss-easy-import": {},
      "tailwindcss": {},
      "postcss-purgecss": {}
    }
  }

Updated workflow: https://dev.to/acciaiodigitale/using-tailwindcss-on-meteor-projects-273m

It might be easier to use a runtime version of TailwindCSS so you don’t have to use PurgeCSS.

See RunCSS: https://dev.to/mudgen/runcss-a-runtime-version-of-tailwindcss-5dic

2 Likes