Skip to content

Instantly share code, notes, and snippets.

@inorganik
Last active May 3, 2024 17:51
Show Gist options
  • Save inorganik/e5beeb02475a805839e71ccc4e26d722 to your computer and use it in GitHub Desktop.
Save inorganik/e5beeb02475a805839e71ccc4e26d722 to your computer and use it in GitHub Desktop.
Tailwind v4 in Angular 17
# STEP 1
#
# Install tailwind. We need the force flag because the angular builder
# has a peer dependency on tailwind ^2.0.0 || ^3.0.0
# Issue to address this: https://github.com/angular/angular-cli/issues/27585
#
$ npm i -D tailwindcss@next @tailwindcss/postcss@next --force
# STEP 2
#
# Add the postcss.config.json file below to the root of your project
# PLEASE NOTE: postcss config support is only available in Angular 17+
# STEP 3
#
# Add tailwind import to your styles.css or styles.scss file
{
"plugins": {
"@tailwindcss/postcss": {}
}
}
@import "tailwindcss";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment