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

81
Visualizações
esbuild is not compiling imported modules

I am trying to compile a very simple typescript code with esbuild.

However esbuild is compiling only the entry file.

This is my setup:

//index.ts
import * as mod1 from './mod1';
mod1.my_method();
//mod1.ts
export function my_method(){
  console.log('debug');
}

I run:

esbuild index.ts --outdir=./dist --platform=node

the compilation is done with no error and if I now check the dist I get only

dist
- index.js
// dist/indes.js
import * as mod1 from './mod1';
mod1.my_method();

but there is no trace of dist/mod1.js. So of course the code cannot run and give an error.

Why esbuild is not compiling all the other files like mod1.ts?

I can't use --bundle in my project.

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

esbuild index.ts --outdir=./dist --platform=node ^^^

you only specify the index.ts file in the commandline

i never actually worked with esbuild, but there is probably a function for folders, like esbuild . --outdir=./dist --platform=node

about 4 years ago · Juan Pablo Isaza 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