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