Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Axios, dependencies or devdependencies?

I've a question though a silly one but I really need to know. If we're using axios then should I install it as dependencies or devdependencies? As I understand that webpack will bundle it in vendor file then installing it in production server as dependencies is just pointless. Please advise

like image 381
Smit Ray Avatar asked Jan 16 '18 18:01

Smit Ray


2 Answers

You should install it as a dependencies because you use it in your application, not only as a dev tool.

like image 174
CodeTherapist Avatar answered Oct 26 '22 04:10

CodeTherapist


devDependencies. Put everything that is not included in the consuming application e.g. through a compilation step into dev dependencies. This way the consumers of your package or your production install or your docker container will not include an unused dependency. Your users will thank you.

like image 30
eljefedelrodeodeljefe Avatar answered Oct 26 '22 03:10

eljefedelrodeodeljefe