Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

261
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda