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

99
Views
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
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!