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

80
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
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