Before using Lightning:container, know that there are the following limitations to consider before adopting this:
- It has performance and scrolling issues, since it essentially uses an iframe.
- It is not designed for a multi-page model, and hence does not store previous state or navigation history. Therefore, keep this method restricted to a single-page only.
- It does not implement the offline caching mechanism that is present in the Lightning experience.
- The static resource has a limit of 5 MB. So, if you have an application that's too large, Lightning:container might not fit your needs. For this scenario, we recommend hosting the application inside the Visualforce page and then iframing the Visualforce page ...