Skip to content

ng add tailwindcss adds tailwindcss to dependencies and devDependencies #33701

Description

@Farbfetzen

Command

add

Is this a regression?

  • Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was

No response

Description

The command ng add tailwindcss adds the package tailwindcss to "dependencies" and "devDependencies".

These are the new dependencies in my package.json after running the command:

"dependencies": {
    "tailwindcss": "4.3.3",
},
"devDependencies": {
    "@tailwindcss/postcss": "4.3.3",
    "postcss": "8.5.25",
    "tailwindcss": "4.3.3",
}

This result differs from a project that is initialized with tailwind. ng new foo --style tailwind adds only devDependencies. This is correct, because it's unnecessary for a package to be in both sections.

Minimal Reproduction

Run ng add tailwindcss.

Exception or Error


Your Environment

Angular CLI       : 22.1.1
Angular           : 22.1.0
Node.js           : 24.18.0
Package Manager   : npm 12.0.2
Operating System  : linux x64

┌───────────────────────────┬───────────────────┬───────────────────┐
│ Package                   │ Installed Version │ Requested Version │
├───────────────────────────┼───────────────────┼───────────────────┤
│ @angular/build            │ 22.1.1            │ 22.1.1            │
│ @angular/cli              │ 22.1.1            │ 22.1.1            │
│ @angular/common           │ 22.1.0            │ 22.1.0            │
│ @angular/compiler         │ 22.1.0            │ 22.1.0            │
│ @angular/compiler-cli     │ 22.1.0            │ 22.1.0            │
│ @angular/core             │ 22.1.0            │ 22.1.0            │
│ @angular/forms            │ 22.1.0            │ 22.1.0            │
│ @angular/platform-browser │ 22.1.0            │ 22.1.0            │
│ @angular/router           │ 22.1.0            │ 22.1.0            │
│ rxjs                      │ 7.8.2             │ 7.8.2             │
│ typescript                │ 6.0.3             │ 6.0.3             │
│ vitest                    │ 4.1.10            │ 4.1.10            │
└───────────────────────────┴───────────────────┴───────────────────┘

Anything else relevant?

No response

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions