Angular 5 ng build --prod Function expressions are not supported in decorators

前端 未结 1 813
时光说笑
时光说笑 2021-01-21 06:58

I\'m trying to build my project which works fine when I\'m just running it locally with ng serve.

but on ng b -prod I get :

          


        
相关标签:
1条回答
  • 2021-01-21 07:45

    The problem comes from your lambda function as stated in the error.

    You could change your queries one by one to be optional instead of doing it with the lambda function:

    query(':leave', [ ... ], { optional: true }),
    

    AOT compilation is really important as it dramatically reduces the size of your app and improves greatly the performances.

    0 讨论(0)
提交回复
热议问题