There's also the option of using Jiti
https://github.com/unjs/jiti
It would add an extra dependency though