title: lazy loading:missing from the TypeScript compilation. Please make sure it is in your tsconfig via the 'files' or 'include' property
body: <p>I created two application (first application is a library and another application consuming component from the library). </p>
  
  <p>The intention is to do lazy loading of an imported library.</p>
  
  <p>when I trigger <code>ng serve</code> it gives an error message, but when I trigger  <code>ng serve --prod --aot --build-optimizer</code> command no problem. this problem occurs in <code>ng build</code> also.</p>
  
  <pre><code>Error:
  ERROR in ./node_modules/bundle/bundle.d.ts
  Module build failed: Error: D:\AngularApp\bundle\BaseApp\app2\node_modules\bundle\bundle.d.ts is missing from the TypeScript compilation. Please make sure it is in your tsconfig via the 'files' or 'include' property.
  The missing file seems to be part of a third party library. TS files in published libraries are often a sign of a badly packaged library. Please open an issue in the library repository to alert its author and ask them to package the library using the Angular Package Format.
  </code></pre>
  
  <ol>
  <li><p>The library is built with <code>ng-packagr</code>:</p>
  
  <pre><code>npm run cd
  </code></pre></li>
  <li><p>created a library *.tgz file. </p>
  
  <pre><code>npm pack
  </code></pre></li>
  <li><p>imported library in another application using. </p>
  
  <pre><code>npm install *.tgz
  </code></pre></li>
  </ol>
  
  <p>consuming application: <code>tsconfig.json</code> </p>
  
  <pre><code>  //consuming application
              {
                  // consuming application    
                  "compileOnSave": false,  
                  "compilerOptions": // consuming application  {
  
                  "outDir": "./dist/out-tsc",
                  "sourceMap": true,
                  "declaration": false,
                  "moduleResolution": "node",
                  "emitDecoratorMetadata": true,
                  "experimentalDecorators": true,
                  "target": "es5",
                  "typeRoots": [
                    "node_modules/@types"
                  ],
                //consuming application  
                  "lib": [
                     // test  
                    "es2017",
                    "dom"
                  ],     
  
                },
                //consuming application
                "include":[
  //test
                      "src/**/*",
                      "node_modules/bundle",
                  ],
                // consuming application
                  "files": [ 
                    //consume application impored library
                    "node_modules/bundle/bundle.d.ts"  // test
                    //consume application impored library
                   ] 
                   }
  </code></pre>