title: How to simplify imports like npm in Angular
body: <p>We were using an npm-library <code>@ng-plus/modal</code> in Angular. And the imports in the project was something like this.</p>
  
  <pre><code>import { Modal, Toast, Alert } from '@ng-plus/modal';
  </code></pre>
  
  <p>Now, we have decided to modify and it lives as a project library under the <code>project/ngplus-modal</code> folder in our app.</p>
  
  <blockquote>
    <p>The problem we are facing is with imports.</p>
  </blockquote>
  
  <p>We already defined <code>paths</code> for the project <code>@modal</code>. We tried replacing the import with the following which does not work.</p>
  
  <pre><code>// Did not work for us: (Desired behaviour)
  import { Modal, IModal, Toast, Alert } from '@modal';
  </code></pre>
  
  <p>What works is the following:</p>
  
  <pre><code>import { Modal } from '@modal/lib/components/modal.component';
  import { Toast } from '@modal/lib/components/toast.component';
  import { IModal } from '@modal/lib/interfaces/imodal.interface';
  </code></pre>
  
  <blockquote>
    <p>However, our problem is that the library is already implemented in
    100+ files and not it is just components, but models and interfaces which are
    scattered throughout the library. How can this be organized like an
    npm import?</p>
  </blockquote>
  
  <pre><code>import { Modal, IModal, Toast, Alert } from 'package';
  </code></pre>