Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

154
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!