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

155
Visualizações
How to convert typescript modules to javascript

I have a src working directory like this:

- src
  - functions
  - final
  - utils

I have two files, both inside "final" which I need to transpile from typescript to javascript to run in browser.

The thing is: my final files are importing functions and classes from the other src folders files, but when I transpile it into javascript, it does not work since the imported lines does not actually brings in the functions and classes

my tsconfig.json looks like this:

{
  "compilerOptions": {
"target": "es3",
"lib": ["es6", "dom", "es2017", "ES2021"],
"module": "commonjs",
"rootDir": "./src", 
"outDir": "./dist",
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"strict": true,
"skipLibCheck": true
}
}

What can I do in order to have it transpiled with the modules to the javascript files I need??

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

0

tsc only compiles files in place. It does not bundle.

To run your project in the browser, you typically need a bundler (such as webpack, parcel, vite, or rollup) to compile and package your code for use in web browsers.

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