title: inject a require into a js vendor module
body: <p>About the framework (while I think the problem itself does not heavily rely on that): Angular 2 with Webpack</p>
  <p>There is the library <a href="https://www.npmjs.com/package/leaflet.heat" rel="nofollow noreferrer">Leaflet.heat</a> which relies on <a href="https://www.npmjs.com/package/simpleheat" rel="nofollow noreferrer">simpleheat</a>. I got the missing type definitions under control.
  I'm importing the libraries in my <code>vendor.ts</code></p>
  <pre class="lang-js prettyprint-override"><code>[...]
  import 'simpleheat';
  import 'leaflet.heat/src/HeatLayer';
  [...]
  </code></pre>
  <p>Inside of the <a href="https://github.com/Leaflet/Leaflet.heat/blob/gh-pages/src/HeatLayer.js" rel="nofollow noreferrer">HeatLayer class</a>, the function simpleheat:</p>
  <pre class="lang-js prettyprint-override"><code>[simpleheat.js]
  if (typeof module !== 'undefined') module.exports = simpleheat;
  
  function simpleheat(canvas) {
  ...
  </code></pre>
  <p>is called. However, the HeatLayer module file does not require simpleheat inside it's file.<br />
  Thus, creating an instance of <code>L.HeatLayer</code> works, but the execution of the respective code in it's function fails with</p>
  <pre class="lang-js prettyprint-override"><code>ReferenceError: simpleheat is not defined
  </code></pre>
  <p>Now, adding (for testing purposes) <code>simpleheat = require('simpleheat');</code> into the HeatLayer file (a vendor), it works.<br />
  Understandably, I don't want to modify a vendor file.</p>
  <p><strong>Question:</strong><br />
  What options do I have, to make the function <code>simpleheat</code> accessible from inside the HeatLayer module?</p>