Turn out that when you import an entity from the barrel (index) file instead of directly from its source you will run into an aot compile issue in your app when you build for prodcution.
ERROR in Error: Error: Internal error: unknown identifier undefined