title: Knockout+Webpack - loading modules
body: <p>I'm using knockoutJs with TypeScript viewmodels and WebPack to bundle it all.</p>
  
  <p>Before I started using modules and webpack I was able to write something like:</p>
  
  <pre><code>&lt;p data-bind="text: moment().format('L')"&gt;
  </code></pre>
  
  <p>But know I get this error: <strong>Message: moment is not defined</strong></p>
  
  <p>If I use moment inside the viewmodel (ie: by assigning it to a variable) it works.</p>
  
  <p>viewmodel.ts:   </p>
  
  <pre><code>import * as ko from 'knockout';
  import * as moment from 'moment';
  
  class TestViewModel {  
      test = moment().format('L'); 
  }
  
  ko.applyBindings(new TestViewModel(), document.getElementById('mainbinding'));
  </code></pre>
  
  <p>view (cshtml partial page)</p>
  
  <pre><code>&lt;pre data-bind="text: test"&gt;&lt;/pre&gt; &lt;!-- this works --&gt;
  &lt;pre data-bind="text:moment().format('L')"&gt;&lt;/pre&gt; &lt;!-- this does not work--&gt;
  </code></pre>
  
  <p>What am I missing?</p>