What can I do about a "require is not defined" error in compiled TypeScript?
<p>I have three TypeScript files in my app. When I build, they compile fine, Gulp puts them in the right place, and the the app crashes because I get:</p>

<blockquote>
  <p>ReferenceError: require is not defined</p>
</blockquote>

<p>For each of the three JS files output from the TS compilation. Now I can't very well tell <code>tsc</code> "do not use <code>require</code>", can I? </p>

<p>When I add the reference </p>

<pre><code>&lt;reference path="~/wwwroot/js/system.src.js" /&gt;
</code></pre>

<p>to gulpFile.js, then <code>require</code> works in that file, but that is running on my build, not in runtime on the browser. It does not work if I add it to one of the compiled JS files.</p>