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

101
Vistas
Dynamically exporting js files in webpack

How do I dynamically grab all of the files in a folder within a src folder in webpack? For example, say I have a directory structure like this:

src/
  packages/
    package.js
    file-a.js
    file-b.js
    file-c.js

I want to call all the file-*.js files from the packages folder at once. Right now, package.js looks like this:

export * from './file-a.js'
export * from './file-b.js'
export * from './file-c.js'

How do I dynamically export all of the file-*.js files from package.js, without having to go in and add a new line every time I add a new file.js file?

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