How to have dynamic exports with es modules ESM?

https://stackoverflow.com/questions/72730194/how-to-do-esm-dynamic-export