Waiting for a library require to finish executing

I think you can do something like:

L = {
  let L = await require('leaflet@1.2.0')
  await require('leaflet.markercluster')
  return L
}

Not sure if it’s the most idiomatic way though.

1 Like