title: ERROR in Error during template compile of 'AppModule' Function calls are not supported in decorators but 'ChartModule' was called
body: <p>I installed <code>angular2-highcharts</code> on my Angular Project, implemented that. Its working but in <code>ng serve</code> mode. But when I executed the command <code>ng build --prod</code>. I got the error :</p>
  
  <p><strong>Error during template compile of <code>AppModule</code></strong></p>
  
  <p><strong>Function calls are not supported in decorators but <code>ChartModule</code> was called.</strong></p>
  
  <p>Its working fine when i executed <code>ng build</code>.</p>
  
  <p>Here is my <code>app.module.ts</code></p>
  
  <pre><code>import { BrowserModule } from '@angular/platform-browser';
  import { platformBrowserDynamic }  from '@angular/platform-browser-dynamic';
  import { NgModule } from '@angular/core';
  import { ChartModule } from 'angular2-highcharts';
  import { AppComponent } from './app.component';
  import { HttpModule } from '@angular/http';
  
  declare var require : any;
  
  @NgModule({
    declarations: [
      AppComponent
    ],
    imports: [
      BrowserModule,HttpModule,
      ChartModule.forRoot(require('highcharts/highstock'),require('highcharts/modules/drilldown')),
    ],
    providers: [],
    bootstrap: [AppComponent]
  })
  export class AppModule { }
  platformBrowserDynamic().bootstrapModule(AppModule);
  </code></pre>