My tsconfig.json file contains
{
"compilerOptions": {
"module": "esnext",
"target": "esnext",
}
}
But the compiled JS files still use exports/require syntax.
How do I fix this?
EDIT:
My directory structure is as follows
- APIs/
- emails/
- sendEmail.ts
- oldFiles/
- file1.js
- file2.js
- index.js
- tsconfig.json
- package.json
I am running tsc using the command tsc APIs/emails/sendEmail.ts from the root directory.