title: Typescripts Compile-On-Save generates incorrect modules
body: <p>I've just updated Web Essentials 2012 and found that now I need to use the built-in compile functionality of the <code>Typescript</code> plugin.</p>
  
  <p>So first I added in the extra code to the project. <a href="http://typescript.codeplex.com/wikipage?title=Compile-on-Save" rel="nofollow">http://typescript.codeplex.com/wikipage?title=Compile-on-Save</a></p>
  
  <pre><code>  &lt;PropertyGroup Condition="'$(Configuration)' == 'Debug'"&gt;
      &lt;TypeScriptTarget&gt;ES5&lt;/TypeScriptTarget&gt;
      &lt;TypeScriptIncludeComments&gt;true&lt;/TypeScriptIncludeComments&gt;
      &lt;TypeScriptSourceMap&gt;true&lt;/TypeScriptSourceMap&gt;
    &lt;/PropertyGroup&gt;
    &lt;PropertyGroup Condition="'$(Configuration)' == 'Release'"&gt;
      &lt;TypeScriptTarget&gt;ES5&lt;/TypeScriptTarget&gt;
      &lt;TypeScriptIncludeComments&gt;false&lt;/TypeScriptIncludeComments&gt;
      &lt;TypeScriptSourceMap&gt;false&lt;/TypeScriptSourceMap&gt;
    &lt;/PropertyGroup&gt;
    &lt;Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\TypeScript\Microsoft.TypeScript.targets" /&gt;
  </code></pre>
  
  <p>However when I compile, I find a few things:</p>
  
  <ul>
  <li>My <code>.min.js</code> files no longer are being compiled.</li>
  <li>I have no preview window (sad times).</li>
  <li>And my <code>.js</code> file is incorrectly generated.</li>
  </ul>
  
  <p>This <code>.js</code>: </p>
  
  <pre><code>/// &lt;reference path="../_references.d.ts" /&gt;
  var ko = require('knockout-mapping');
  var library = require("./foo/library");
  
  var myModule;
  (function (myModule) {
      var Foo = (function () {
          function Foo(parameters) {
              this.parameters = parameters;
  </code></pre>
  
  <p>from this <code>.ts</code>:</p>
  
  <pre><code>import ko = require('knockout-mapping');
  import library = require('foo/library');
  
  module myModule {
  
     export class Foo {
  
        constructor(public parameters) {
  </code></pre>
  
  <p>The <code>import</code> statement is relative (wrong for my setup), and it is now using a <code>require</code> instead of <code>define</code>. How can I fix this?</p>
  
  <p>Thanks.</p>