Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Why install the Vite plugin as a dependency and not dev dependency? #19125

Unanswered
bertday asked this question in Help
Discussion options

Hello! I'm newer to Tailwind and wanted to ask about the installing using Vite page. The second step is to run this command:

npm install tailwindcss @tailwindcss/vite

Installing tailwindcss that way makes sense to me, but wouldn't installing @tailwindcss/vite without --save-dev tell Vite to bundle it into your distributable? That seems unnecessary to me, but please let me know if I'm misunderstanding!

You must be logged in to vote

Replies: 2 comments 1 reply

Comment options

From a maintainer in Discord:

It just doesn't really matter. If you want it to be in your devDependencies then you can put it there 👍
Why the change was made? Just fewer characters and doesn't matter anyway.

You must be logged in to vote
0 replies
Comment options

Thank you @wongjn ! I'm just curious, why doesn't it matter? Is it because of how Vite bundling works?

Edit: I just saw what you said that that was from a maintainer! I can head over to Discord and ask; thank you for passing that along!

You must be logged in to vote
1 reply
Comment options

wongjn Oct 15, 2025
Collaborator

Yes, it's how Vite bundling works. What goes into the compiled bundle is independent of whether the dependency was in devDependency or not - Vite does not take that into consideration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants

AltStyle によって変換されたページ (->オリジナル) /