title: Function calls are not supported in decorators but
body: <h3>Description</h3>
  
  <p> I wrote an angular library SxfedModule and use it in a different angular applications. when I packaged my application with the library, evenything works fine without --prod.</p>
  
  <h3>Reproduction Steps</h3>
  
  <p>Use this library in a new angular application which is generated by the angular cli by calling SxfedModule .forRoot() in the app.module.ts.</p>
  
  <p>NgModule of the library:</p>
  
  <pre><code>    import { NgModule, ModuleWithProviders } from '@angular/core';  
      import { SxfedformModule } from './component/sxfedform/sxfedform.module';
      export const ElChildModules: any = {
        SxfedformModule,
      }
      export const ELMODULES_GROUP: any[] = [
        SxfedformModule,
      ]
      @NgModule({
        imports: [
          SxfedformModule.forRoot(),
        ],
        exports: ELMODULES_GROUP,
      })
      class SxfedModule {
        static forRoot(): ModuleWithProviders {
          return {
            ngModule: SxfedModule,
            providers: [],
          };
        }
      }
      export {
        SxfedModule,
      };
  </code></pre>
  
  <p>NgModule of the application:</p>
  
  <pre><code>    import { BrowserModule } from '@angular/platform-browser';
      import { BrowserAnimationsModule } from '@angular/platform- 
     browser/animations';
      import { NgModule } from '@angular/core';
      import { AppComponent } from './app.component';
      import { ElModule } from 'element-angular'; 
      import { SxfedModule } from 'sxfed-angular-ui';
      import { RouterModule } from '@angular/router';
      import { FormsModule, ReactiveFormsModule } from '@angular/forms';
      import { appRoutes } from './app.routes';
      @NgModule({
        declarations: [
          AppComponent,
          LoginComponent,
        ],
        imports: [
          BrowserModule,
          FormsModule,
          ReactiveFormsModule,
          BrowserAnimationsModule,
          ElModule.forRoot(),
          SxfedModule.forRoot(),
          RouterModule,
          RouterModule.forRoot(appRoutes),
        ],
        providers: [
        ],
        bootstrap: [AppComponent]
      })
      export class AppModule { }
  </code></pre>
  
  <p>Try ng build --prod</p>
  
  <h2>Error</h2>
  
  <p>
  </p>
  
  <pre><code>ERROR in Error during template compile of 'AppModule'
    Function calls are not supported in decorators but 'SxfedModule' was called.
  </code></pre>
  
  <h2>  Your Environment</h2>
  
  <p>Angular CLI: 7.2.3
  Node: 8.11.1
  OS: win32 x64
  Angular: 7.2.2</p>
  
  <p>Thank you for reading my problem.
  Please help me, thank you.</p>