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

189
Vistas
How convet TypeScript file with extension of import

I have tsconfig.json

{
  "compilerOptions": {
    "module": "esnext",
    "noImplicitReturns": true,
    "noImplicitThis": true,
    "noUnusedLocals": false,
    "preserveConstEnums": true,
    "removeComments": true,
    "sourceMap": false,
    "strictNullChecks": true,
    "target": "esnext",
    "noImplicitAny": true,
    "strict": true,
    "moduleResolution": "node",
    "lib": ["dom", "esnext"],
    "outDir": "../js"
  },
  "include": [
    "fs/path.ts"
  ],
  "files": [
    "index.ts"
  ]
}

But it give me output file with this import

export { Barrier, Events, Semaphore } from './async';
export { QueryString } from './querystring';
export { Path } from './path';
export { Url } from './url';
export { Buffer } from './buffer';

and

import { RestServer } from './server';
import { Fetch } from './fetch';

But for module it is can be path.

import { RestServer } from './server/index.mjs';
import { Fetch } from './fetch/index.mjs';

How can i compile js file with path in import ?

And how can i compile file with mjs extension ?

Now i created gulp file with task what rename js to mjs

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