Ooh that was the missing piece, import.then(). Here’s a version that awaits the promise without the while loop.