title: Using ng2- libraries in --prod build throws "Unexpected value... Please add a @Pipe/@Directive/@Component annotation"
body: <p>I'm running an Angular 5 application on Angular CLI v1.6.3. I need to use a library called <code>ng2-img-map</code> since it's the only working solution for one of the issues. However when I run <code>ng build --prod</code> it throws. </p>
  
  <pre><code>ERROR in : Unexpected value 'ImgMapComponent in C:/Users/.../node_modules/ng2-img-map/ng2-img-map.d.ts' declared by the module 'AppModule in C:/Users/.../src/app/app.module.ts'. Please add a @Pipe/@Directive/@Component annotation.
  </code></pre>
  
  <p>When I run only <code>ng build</code> it works without a problem.</p>
  
  <p>I've noticed this happens with other <code>ng2-</code> libraries which haven't been updated in a year or so. I simply use something else, however I don't have options/time for this one.</p>
  
  <p>Is there any way I can fix/bypass this and use the library in <code>--prod</code> mode?</p>