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

151
Views
How to translate this esbuild CLI sentence to JS file

I managed to construct this esbuild CLI sentence, but I am struggling to transform it to a JS build file:

esbuild out1=src/out1.ts out2=src/out2.ts out3=src/out3.ts --bundle --outdir=dist --watch --minify

This takes 3 different files and bundles it to 3 different files, that is exactly what I want. But now I want to add more bundle rules, and I don't want to keeping adding to this and have a separate file for the bundle.

Someone can point me to the docs or giving some hints on how to achieve it?

about 4 years ago · Santiago Trujillo
1 answers
Answer question

0

It was the silliest thing. Just add them as an entryPoints and add the left ones to the esbuild.build config:

import { build } from 'esbuild';

build({
  entryPoints: ['src/out1.ts', "src/out2.ts", "src/out3.ts"],
  outdir: 'dist',
  minify: true,
  bundle: true,
  watch: true,
  target: 'es2020',
}).catch(error => process.exit(1));
about 4 years ago · Santiago Trujillo 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!