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 problem is now that when I run my app, I get this error:
index.js:2 Uncaught ReferenceError: exports is not defined These are the first two lines in index.js:
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); I don't know that that line does. Typescript added it when compiling. My app works fine if I remove it.
How do I get rid of this error?
Oh and here's my tsconfig, if that's relevant.
{ "compilerOptions": { "target": "es6", "module": "commonjs", "moduleResolution": "node", "isolatedModules": false, "jsx": "react", "experimentalDecorators": true, "emitDecoratorMetadata": true, "declaration": false, "noImplicitAny": false, "noImplicitUseStrict": false, "removeComments": true, "noLib": false, "preserveConstEnums": true, "suppressImplicitAnyIndexErrors": true }, "exclude": [ "node_modules", "typings/browser", "typings/browser.d.ts" ], "compileOnSave": true, "buildOnSave": false, "atom": { "rewriteTsconfig": false } }