title: Relative paths using requirejs in combination with Typescript and AMD
body: <p>There are several Javascript files, organized in folders Scripts/folder1, Scripts/folder2, ...</p>
  
  <p>With requirejs.config.baseUrl a folder is defined as the default, for example Scripts/folder1. Then in requirejs.config.paths some files are addressed with just the filename, and some are addressed with a relative path (like ../folder2/blabla).</p>
  
  <p>When coding the Typescipt file folder2/blabla.ts we need the module "math" from folder1. So we write</p>
  
  <pre><code>import MOD1 = module("../folder1/math");
  </code></pre>
  
  <p>Regarding Typescript, anything is fine with that. It can find the module. However, with requirejs there is a problem. It does not know the module "../folder1/math", it only knows "math".</p>
  
  <p>The problem seems to be that the import statement expects a filename, being adressed by starting from the current directory. However, this isn't the module id that requirejs knows about.</p>
  
  <p>Using absolute paths anywhere, both in the requirejs configuration and the import statement in Typescript, solves the problem.</p>
  
  <p>Am I doing this wrong? Or are absolute paths the way to go?</p>