Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

173
Views
¿Cuáles son las diferencias entre {predeterminado como nombre} y {nombre como predeterminado} al exportar módulos js?

Estaba echando un vistazo a swiper.esm.js de Swiperjs (fuente copiada aquí como referencia: https://jsfiddle.net/fw4zj8qk/ ), y la primera línea es

 export { default as Swiper, default } from './core/core.js';

mientras que las siguientes son de la forma:

 export { default as Virtual } from './modules/virtual/virtual.js';

y en los documentos de MDN puedo encontrar algo así como

 export { Something as default }

es posible. Así que actualmente puedo ver las siguientes sintaxis:

 export { Something as default } export { default as Something } export { default as Something, default }

Cual es la diferencia entre los 3?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

// Import name `Something` from `...`, // re-export as this module's default export export { Something as default } from '...'; // Import default export from `...`, // re-export as `Something` from this module export { default as Something } from '...'; // Import default export from `...`, // re-export it as `Something` from this module // and this module's default export export { default as Something, default } from '...';
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!