Im getting this error message (Uncaught ReferenceError: exports is not defined) when trying to import other ts files in the main app.ts
app.ts
import { LanguagesConfigs } from './LanguagesConfigs';
let languagesConfigs = new LanguagesConfigs();
LanguagesConfigs.ts
export class LanguagesConfigs {
code
}
tsconfig.json
{
"compilerOptions": {
"target": "es5",
"module": "commonjs",
"sourceMap": true
}
}
I compile it in visual studio code. It generates the .js and .js.map files
Note: I'm not using frames like angular, just plain typescript. Note2: CommonJS is installed in the project (Typescript ReferenceError: exports is not defined)