DEV Community

Discussion on: Demystifying `devDependencies` and `dependencies`

Collapse
 
qm3ster profile image
Mihail Malo

The second paragraph is confusing.
Why should I have Webpack or something that webpack is bundling in dependencies? Both are often (there are exceptions) used only in development. Only server dependencies should be in dependencies?

Collapse
 
mshertzberg profile image
Michael Scott Hertzberg • Edited

Hi Mihail,

I understand your confusion in the sentence when I say:

You should ensure that these packages are present in dependencies, as they're needed at runtime.

these packages refers to all required dependencies that your application needs at run-time. Not specifically Webpack or Rollup.

Collapse
 
qm3ster profile image
Mihail Malo

Yeah, but I mean I put my webpack and clientside dependencies into devDependencies. And it works out great.

Thread Thread
 
mshertzberg profile image
Michael Scott Hertzberg

it works, but it's not semantically correct.

Thread Thread
 
qm3ster profile image
Mihail Malo

Seems more semantic than downloading unused packages. 🤔
The less packages in production, the faster and safer 🤔
Maybe we should just Rollup our servers and not have runtime dependencies at all 🤔