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

193
Visualizações
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 à 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