title: Angular Library - 'rootDir' is expected to contain all source files. (environment.ts)
body: <p>I was working on my first Angular 7 library, however I am getting the this error when trying to compile the library.</p>
  
  <p>Error: error TS6059: File '...environment.ts' is not under 'rootDir' 'my-angular-library\projects\my-library\src'. 'rootDir' is expected to contain all source files.</p>
  
  <p>Looking at my tree I have:</p>
  
  <pre><code>-projects
    -my-library
       -src
  -src
    - environments
  </code></pre>
  
  <p>In my class I have the following import:</p>
  
  <pre><code>import { environment } from "src/environments/environment";
  </code></pre>
  
  <p>I was checking other threads where they mentioned bugs in typescript, however I am running the latest version "typescript": "~3.1.1".</p>
  
  <p>Other threads mentioned about a misconfigured rootDir.  I checked my project and I do not have rootDir defined in any of the config files.</p>
  
  <p>I don't need to add an environment to the projects do I?</p>