Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

152
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda