For years, I have sought a definitive, go-to guide for refactoring CommonJS modules to ES modules in such a way that is easy to write, has a simple build step and stays backwards compatible.
Today, I have found it.
https://webreflection.medium.com/a-nodejs-dual-module-deep-dive-8f94ff56210e