React - How to install only prod deps while building in Jenkins with webpack as a dev dep?

Viewed 27

I've a React application that is built via Jenkins when goin to production.

Jenkins installs all the deps, runs jest tests and then builds the production version with webpack.

In this way however we're carrying to production also all the dev Deps, resulting in a bigger bundle. Doing yarn install --prod is not an option, since Jest and Webpack are dev deps.

How to achieve my goal?

0 Answers
Related