npx @angular/cli new tailwind --minimal --inlineStyle --inlineTemplate
This allows to modify the webpack config that the angular cli uses... needed to customize the postcss config npm i -D @angular-builders/custom-webpack
- add the webpack.config.js to the project root
- replace '@angular-devkit/build-angular:browser' with '@angular-builders/custom-webpack:browser' and '@angular-devkit/build-angular:dev-server' with '@angular-builders/custom-webpack:dev-server' in the angular.json and add the two entries for 'customWebpackConfig' in the build and serve targets => compare angular.json and angular.orig.json
npm i -D tailwindcss
- create / customize the tailwind.config.js in the project root
- add tailwind.css to the src folder and add in the 'styles' field in angular.json