Have you been paying attention to the recent developments regarding ES modules (ESM) in Node.js? If not, you really should. Earlier this month, support for ESM landed in Chrome Canary, and it stirred up a lot anxiety on Twitter around the actual details of how ESM will be implemented. The Webpack team put out a nice, informative blog post that’s definitely worth a read.
My point is this: I’m all for taking advantage of new language features, new APIs, and so on, but if you want to stay on the bleeding edge, you’ve got to commit to staying on the bleeding edge. Your code is almost certainly going to need to be refactored at some point. You’re probably going to have to learn a lot of new concepts along the way and, just as importantly, unlearn a lot of stuff you used to know. You should dispense with any illusions that you’re writing future code today, because you don’t actually know what future code will look like. The future isn’t now, it’s later.