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

338
Vistas
What is the syntax used in const { default: _ } = await import('lodash');?

I'm currently following the dynamic imports guide in Webpack documentation and came across this following example:

async function getComponent() {
  const element = document.createElement('div');
  const { default: _ } = await import('lodash');
  element.innerHTML = _.join(['Hello', 'webpack'], ' ');
  return element;
}
getComponent().then((component) => {
  document.body.appendChild(component);
});

Question 1: What is the syntax used in const { default: _ } = await import('lodash');?

I understand that { default: _ } is needed because of how Webpack import CommonJS modules. But what does it mean to have it on the left side of the assignment?

I tried to get the answer online and was fruitless after much effort. I am pretty sure this is unrelated to Webpack itself, but I don't really know how I should phrase my question to get the answer from Google instead of asking it here. So for my future improvement:

Question 2: How would you formulate this question to get an answer from the search engine?

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