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

200
Views
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
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!