AOT runtime error with AWS Amplify and Angular 7 - API is not defined
2
I have set up AWS Amplify in an Angular 7 project using the API module for GraphQL capabilities. All seems to work when served using ng serve. If however if I use AOT compilation - e.g. For a production build then I receive no compilation errors but on runtime I see the following error ERROR Error: Uncaught (in promise): ReferenceError: API is not defined I have isolated the problem in that AOT is the trigger for it occurring but unsure whether it is an Amplify issue or something silly I am doing regarding Angular. What am I doing wrong and how can I resolve it?
angular angular7 aws-amplify angular-aot
share | improve this question
edited Nov 26 ...