title: Dynamic Path Import - Angular Component
body: <p>Is there any way to import components, or anything for that matter, in a format like this where there is a conditional which decides which one to use?</p>
  
  <pre><code>import { environment } from '../../environments/environment';
  
  import { NgModule, APP_INITIALIZER } from '@angular/core';
  import { CommonModule } from '@angular/common';
  import { FormsModule, ReactiveFormsModule } from '@angular/forms';
  
  if (environment.envName == 'dev')
      import { ListInventoryComponent, ConfirmDeleteDialog } from 'this_local_path';
  else
      import { ListInventoryComponent, ConfirmDeleteDialog } from 'this_npm_package_path';
  </code></pre>
  
  <p>I have local components and modules that I am developing and creating npm packages from, but also would like to be able to test them without changing every reference to it in the code.</p>