We ultimately decided to bite the bullet and refactor all of our files before merging them all at once. We used this tool to automatically rewrite the define()
headers into import
statements in bulk; after that we just need to rewrite our async imports manually.