angulartailwind-css

How to make two different tailwind configs in angular project?


For example, I have angular (v13) project, and this project contain several applications in angular.json (it different websites). Before, I can use custom-webpack. But now, when I have angular 13 and tailwind 3, i can't use custom-webpack anymore. How to make different tailwind-configs for each application in a angular-project?


Solution

  • You can just put tailwind.config.js per projects/[project-name]/ and then in each of applications' styles.css you can add @config "../tailwind.config.js"; at the top of the file.

    Works with Angular 16 and Tailwind 3.