title: "Value at position 4 in the NgModule.imports of MyCommonLibraryModule is not a reference" when importing an Angular 9 library
body: <p>I have two Angular projects that share common code through an Angular library. I ran <code>ng update</code> in both projects and my Angular library to try to upgrade from Angular 8 to 9. The migration scripts changed my <code>tsconfig.app.json</code> file from </p>
  
  <pre><code>  "include": [
      "../src/**/*"
    ]
  </code></pre>
  
  <p>to </p>
  
  <pre><code>  "files": [
      "main.ts",
      "polyfills.ts"
    ],
    "include": [
      "src/**/*.d.ts"
    ]
  </code></pre>
  
  <p><a href="https://update.angular.io/#8.0:9.0l3" rel="nofollow noreferrer">Angular's migration guide</a> states</p>
  
  <blockquote>
    <p>We have updated the tsconfig.app.json to limit the files compiled. If you rely on other files being included in the compilation, such as a typings.d.ts file, you need to manually add it to the compilation.</p>
  </blockquote>
  
  <p>When I tried to run my app (<code>ng serve</code> from one of the projects that consumes the library), I got an error</p>
  
  <pre><code>ERROR in Failed to compile entry-point my-common-library (module as esm5) due to compilation errors:
  node_modules/my-common-library/fesm5/my-common-library.js:5207:30 - error NG1010: Value at position 4 in the NgModule.imports of MyCommonLibraryModule is not a reference: [object Object]
  
  5207                     imports: [
                                    ~
  5208                         CommonModule,
       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   ...
  5225                         MatAutocompleteModule
       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  5226                     ],
       ~~~~~~~~~~~~~~~~~~~~~
  </code></pre>
  
  <p>If I replace my library's <code>tsconfig.app.json</code> back to </p>
  
  <pre><code>  "include": [
      "../src/**/*"
    ]
  </code></pre>
  
  <p>then everything works great. So I guess my questions are</p>
  
  <ol>
  <li>Is <code>ng update</code> not meant to work with libraries?</li>
  <li>Is this a bug?</li>
  <li>Is my "fix" OK or am I missing out on some Angular 9 optimizations? Is there a better way?</li>
  </ol>