The ts compiler emit this line in every file:
Object.defineProperty(exports, "__esModule", { value: true });
But my code is running on Nodejs, I am not writing a libaray so I think this line is unnecessary for me. How can I disable it? My compiler option is:
{
"compilerOptions": {
"target": "es6",
"module": "commonjs",
"allowJs": true,
"sourceMap": true,
"outDir": "build",
"moduleResolution": "Node",
"lib": ["es6"]
}
}
For example, compile this ts file:
function add(a: number, b: number): number {
return a + b
}
export { add }
I got:
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
function add(a, b) {
return a + b;
}
exports.add = add;
//# sourceMappingURL=App.js.map
How can I remove the second line?