I add JQuery in Typescript but I have this error:
Uncaught ReferenceError: exports is not defined
Code TS:
import * as $ from 'jquery' $('.test').click(function(eventObject){ alert('med'); })
code js:
"use strict"; exports.__esModule = true;var $ = require("jquery");$('.test').click(function (eventObject) { alert('med');});
tsconfig.json:
{"compilerOptions": {"target": "es5","module": "es6","pretty": true,"experimentalDecorators":true },"files": ["demo.ts","typings/index.d.ts" ],"excluse": ["node_modules"]}
how to resolve this bug ?