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

263
Vistas
When using babel-loader with webpack, does babel-loader transpile code differently than when using Babel directly?

Are the defaults the same? Do they have different targets? Is babel-loader contingent on webpacks targets?

Reason I ask is I am using babel-loader with webpack and when running in production mode, the code is being transpired correctly, expect the const keyword, that word is not being changed to 'var'. However when transpiling with babel directly on the file using babel and not babel-loader through webpack, the output obviously is changing the const keyword to var.

The only time it transpiles const to var, is when I set the webpack.config.js file to have target: ["web", "es5"] however, I feel that should not matter, since babel-loader is just loading the transpiled code from the babel runtime...right? Which contains the var keyword. Or is it not?

What is babel-loader doing different than when running babel on the file directly?

about 4 years ago · Juan Pablo Isaza
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