Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

95
Vistas
Does Webpack include all dependent node modules along with the created bundle for production?

We all know that when we hit the npm run build, the react scripts uses the Webpack and creates a bundle going through all the dependency graph (follow the imports) and creates a bundle.js and places it inside dist/build folder which is used for production. I recently read that even React is a devDependency (?) because once the bundle has been created there’s no need of react (basically no need of node_modules) at production because the final bundle is a mix of js and css files which the browser can understand. Here are my questions.

1) Please let me know if the above statement about React being a devDependency is correct or not?

2) Since we have a lot of dependent node modules when we install a node package. Is Webpack going to bundle all these node modules as well into the final bundle.js? If so, wouldn’t it be a very large bundle? How does this work?

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Technically speaking, React is a dev dependency in a bundled app, because you don't need it in production unless you also do server side rendering. Consider a case where you have a frontend app with an express server. You bundle the app using webpack and deploy it as static JS/CSS asset, but you express server no longer needs it as you are not doing SSR. So for deploying the server, you can prune dev dependencies, keep around only what's needed by the server and keep the server smaller.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda