Any "official" guide on how to add leaflet to ionic and get it working for Android?

So I’m trying to add a leaflet map to a project. While I get everything to work when using ionic serve to visualize it on the browser, when I do ionic capacitor run android No map will show on the Android Studio Virtual Device. The canvas draws, the attibution shows, the -/+ for zoom shows, but the tiles for the map wont load, it just shows a gray background.

I have created a new blank project. On index.html I have added the links to leaflet css and js.
On I added container for my map.

  <div id="container">
    <div id="myMapContainer">
      <div id="myMap"></div>

with simple css

#myMapContainer {
  width: 100vw;
  height: calc(100vh - 56px);
  margin-top: 56px;
  background-color: cornflowerblue;

#myMap {
  width: 100vw;
  height: 100%;

Then on I added few lines of code

ngOnInit() {
    let myMap ="myMap").setView([51.505, -0.09], 13);
    let aMap = new L.tileLayer(
          '&copy; <a href="">OpenStreetMap</a> contributors, &copy; <a href="">CartoDB</a>'
    setTimeout(() => {
    }, 10);
    myMap.on("dragend", event => {

I also added a declare const L; so it doesn’t complain about not knowing what L is.

While all this works on browser, it wont work on Android Studio.

Anyone has any idea why this could be happening?

If someone interested I guess I could upload the full src somewhere. Thanks a lot in advance.