title: Facing a strange issue with angular 5 development vs production code
body: <p>The following code is working perfectly fine in development mode:
  ng serve --open</p>
  
  <pre><code>addDriver(driver: any) {
     return fromPromise(this.db.insert('driver', driver));
  }
  </code></pre>
  
  <p>But fails with the following error when deployed to production with this error: ng build --prod</p>
  
  <blockquote>
    <p>ERROR TypeError: Object(...) is not a function</p>
  </blockquote>
  
  <p>Getting this error on <code>this.db.insert</code></p>
  
  <p>I am guessing it has something to do with ASI(Automatic Semicolon Insertion)</p>
  
  <p>Any help is highly appreciated. </p>
  
  <p>Thanks in advance.</p>