js-data-http icon indicating copy to clipboard operation
js-data-http copied to clipboard

axios as devDependency

Open oprogramador opened this issue 8 years ago • 4 comments

I noticed axios belongs here to devDependencies but IMO it's a prod dependency.

oprogramador avatar Dec 21 '16 03:12 oprogramador

Currently axios is bundled inside dist/*.js. Probably that's why listed only as a dev dependency. IMHO axios should be peerDependency and not bundled into dist.

Hagith avatar Apr 13 '17 13:04 Hagith

I consider axios as an implementation detail. It could be replaced by superagent or another library and behave in the same way.

So IMO it should be a prod dependency.

oprogramador avatar Apr 13 '17 19:04 oprogramador

If you use js-data-http, then axios is bundled into dist/js-data-http.js. If you use js-data-fetch, axios is not bundled, and you need to provide an agent, such as superagent. If you use js-data-http-node, then axios is a prod dependency and will be installed and loaded by your app. I will add axios as a prod dependency of js-data-http.

jmdobry avatar Jul 02 '17 22:07 jmdobry

I agree with @Hagith and think axios should be a peerDependency. If you're using js-data-http but are using axios in your app for other requests, would it then not end up being bundled twice?

chlab avatar Dec 01 '17 15:12 chlab