js-data-http
js-data-http copied to clipboard
axios as devDependency
I noticed axios belongs here to devDependencies but IMO it's a prod dependency.
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
.
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.
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
.
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?