Official docs say it’s for

Packages that are only needed for local development and testing.

Umm, okay. Not 100% clear there. Some articles mention things like ESLint or Jest (k, I’m onboard there) but others mention Babel or WebPack. I get that you don’t need WebPack libraries to be loaded in the browser but how the hell do you bundle up your code without it? When you use npm ci or npm install you’ll get all dependencies but isn’t it good practice (in a CICD environment) to use --omit=dev or --only=prod?

  • dariusj18@lemmy.world
    link
    fedilink
    arrow-up
    1
    ·
    8 months ago

    For frontend I use the dev dependencies for testing tools. Ex. Cypress. That way my build pipeline doesn’t need to download a bunch of things that won’t be used.