title: Typescript2 path module resolution
body: <p>tl;dr : module resolution does not apply ?</p>
  
  <p>Hello,</p>
  
  <p>I am playing around with Typescript2 module resolution feature.</p>
  
  <p>I've noticed that it is now possible to specify "Paths", so that you can do the following : </p>
  
  <p><strong>Old way</strong></p>
  
  <pre><code>import {a} from "../../../foo"
  </code></pre>
  
  <p><strong>New way</strong></p>
  
  <pre><code>import {a} from "services/foo"
  </code></pre>
  
  <p>To do so, you need to add some configs to your tsconfig.json</p>
  
  <pre><code>    "compilerOptions": {
          "baseUrl": ".",
          "paths": {
              "services/*": ["./application/core/services/*"],
          }
      }
  </code></pre>
  
  <p>Problem that I have, is that when compiled, the import actually doesn't change. My javascript output still contains that import from "services/foo", so that obviously crash at runtime on my node server.</p>
  
  <p>I use gulp-typescript to compile my javascript files : </p>
  
  <pre><code>var tsProject = ts.createProject("tsconfig.json");
  return tsProject.src()
      .pipe(sourcemaps.init())
      .pipe(tsProject()).js
      .pipe(sourcemaps.write("../api"))
      .pipe(gulp.dest(function(file) {
          return file.base;
  }));
  </code></pre>
  
  <p>I am completely lost here and would love to use that module resolution, so that I can move away from that ../../ hell of imports. Any help would be more than appreciated !</p>