title: Function expressions are not supported in decorators in 'auth'
body: <p>I am trying in build my angular 7 project using aot but aot is throwing following error</p>
  
  <pre><code>ERROR in app/app.store.ts(10,25): Error during template compile of 'AppStoreModule'
  
  Function expressions are not supported in decorators in 'auth'
  'auth' references 'auth'
    'auth' contains the error at app/state/auth/auth.reducers.ts(12,41)
      Consider changing the function expression into an exported function.
  </code></pre>
  
  <p>I have checked ngrx reducer for auth which will be look like following</p>
  
  <pre><code>export const auth: ActionReducer&lt;any&gt; = (
    state = initialState,
    action: authActions
  ) =&gt; {
    switch (action.type) {
      case Auth.AUTH_REFRESH:
      case Auth.AUTH_LOGIN:
        console.log(" reducer called");
        return Object.assign({}, state);
      case Auth.AUTH_LOGIN_SUCCESS:
        console.log("login success reducer");
        let token = localStorage.getItem("token");
        const decodedToken = helper.decodeToken(token);
        console.log(decodedToken.sub);
        return Object.assign({}, state, {
          currentUser: decodedToken.sub,
          loggedIn: !helper.isTokenExpired(token)
        });
  
      default:
        return state;
    }
  };
  </code></pre>
  
  <p>Here is my AppStoreModule</p>
  
  <pre><code>@NgModule({
    imports: [
      StoreModule.forRoot({
        auth,
        app,
        search
      }),
      EffectsModule.forRoot([AuthEffects, AppEffects, SearchEffects])
    ]
  })
  </code></pre>
  
  <p>I dont know what is the problem with the code.</p>