Answer the question
In order to leave comments, you need to log in
Setting package.json: dependencies or devDependencies?
Hello.
A question that has been haunting me for quite some time now. So far I've been solving it for myself mostly on a whim, but it's time to figure it out.
The point is this. Let's say I have a project that is built by webpack, it uses a group of babel packages (core, polyfill, preset), plugins for webpack itself, including bundle-analyzer. Many mans write that webpack needs to be added to devDependencies: they say that the assembly has nothing to do with production, it's development. In my understanding, only bundle-analyzer, which is used only in the development process, belongs to development, but webpack should be in dependencies, because otherwise I won’t be able to assemble the prod assembly by first installing the dependencies, for example, with the commandyarn install --prod
(in my case, the assembly takes place on the gitlab-ci side).
Actually, a request to connoisseurs: help me dot all the i's in my head and finally figure out when a package should be included in dependencies, and when in devDependencies.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question