I\'m trying to get started with Typescript for Electron development. After wrestling with getting typing for node and jquery, I finally got my .ts file error free.
The p
I had the same issue with a js file generated by the Typescript compiler. Same line :
Object.defineProperty(exports, "__esModule", { value: true });
And same error :
game.js:2 Uncaught ReferenceError: exports is not defined
I was defining a Game class in this file. I solved the issue by adding this at the end of my game.ts file:
export = Game;
With this, the Typescript compiler replaced:
Object.defineProperty(exports, "__esModule", { value: true });
with:
module.exports = Game;
No more error for me after this.