Why don’t Tailwind CSS docs use the -D flag during installation?
#19941
Closed
abhishekmardiya
started this conversation in
General
Replies: 1 comment 1 reply
-
|
From a maintainer in Discord:
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Inconsistency in Tailwind CSS installation: dependencies vs devDependencies
I was going through the official Tailwind CSS Next.js installation guides and noticed a small inconsistency:
Tailwind docs:
https://tailwindcss.com/docs/installation/framework-guides/nextjs
→ installs without
-DNext.js docs:
https://nextjs.org/docs/app/getting-started/css#tailwind-css
→ installs with
-D(as devDependencies)Why this is confusing
Tailwind CSS is generally a build-time tool, so installing it as a devDependency (as shown in Next.js docs) seems more accurate.
However, the Tailwind docs install it under regular dependencies, which can be misleading for developers trying to follow best practices.
Question
Is this difference intentional for simplicity/tooling reasons, or should Tailwind docs also recommend using
-Dfor consistency?Would be great to have clarity here to avoid confusion for developers.
Beta Was this translation helpful? Give feedback.
All reactions