title: TypeScript MultyProject referencing
body: <p>I'm having problems getting my game project to compile correctly.</p>
  
  <p>This is my folder structure.</p>
  
  <pre><code>**R1** -&gt; *Engine Project.*
  **R2** -&gt; *EngineModule Project.*
  **R3** -&gt; *Game Project.*
  </code></pre>
  
  <p>I want the modules to be independent from the engine it self, so i import the modules and the engine separately in the game.</p>
  
  <p>References:</p>
  
  <p><strong>R1</strong> has no references.
  <strong>R2</strong> references the engine project. <strong>R3</strong> references the other 2.</p>
  
  <p><strong>R2</strong> config file.</p>
  
  <pre><code>{
      "compilerOptions": {
          "rootDir": "./",
          "outDir": "./dist/",
          "noImplicitAny": true,
          "module": "es6",
          "moduleResolution": "node",
          "target": "es5",
          "composite": true,
          "sourceMap": true
      },
      "references": [
          {
              "path": "../R1"
          }
      ],
      "typeRoots": [
          "../R1"
      ]
  }
  </code></pre>
  
  <p><strong>R3</strong> Config file:</p>
  
  <pre><code>{
      "compilerOptions": {
          "outDir": "./dist/",
          "noImplicitAny": true,
          "module": "es6",
          "moduleResolution": "node",
          "target": "es5",
          "composite": true,
          "rootDir": "./"
      },
      "references": [
          { "path": "../R1" },
          { "path": "../R2" }
      ]
  }
  </code></pre>
  
  <p>This is the error i get:</p>
  
  <pre><code>../R2/dist/index.d.ts:1:22 - error TS2307: Cannot find module '../R1'.
  1 import { TESTR1 } from "../R1";
  </code></pre>
  
  <p>The <strong>TESTR1</strong> class is exported and when i compile <strong>R2</strong> it does it fine.</p>
  
  <p>This is R3 <strong>index.ts</strong> file.</p>
  
  <pre><code>import { TESTR1 } from "../R1";
  import { TESTE2 } from "../R2";
  </code></pre>