Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Tailwind being installed as dev dependency rather than dependency

I am developing a project using ReactJs and Tailwind CSS but the Tailwind is installed as dev-dependency in my project. And I am a little bit worried that it won't be available in the production when my application is deployed . I have used the Tailwind's installation documentation for ReactJs to save the Tailwind as dependency , But it is shown as dev-dependency in the package.json file.

What to do ? So that it would be installed as dependency .

like image 959
Arpit Jha Avatar asked May 09 '26 00:05

Arpit Jha


1 Answers

Hi @Arpit Jha,

Tailwind CSS package to be listed as a dev-dependency in your project's package.json. it's normal things when you install any dependency, is only needed during the development process and are not necessary for the production. When you build your React application for production, the Tailwind CSS styles will be compiled into regular CSS. It doesn't matter if it's listed as a dev-dependency.

keep in mind that it is still not recommended to include development dependencies, such as Tailwind CSS, in the production build of your application.

And in the last. You are still having issues with related Tailwind. Then you can join Tailwind community or Discord server. And if not work for your then Stack Overflow is here for you.

like image 145
DSDmark Avatar answered May 10 '26 19:05

DSDmark



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!