I'm also happy using Common-JS syntax on the Node.js. In the odd case that both the client (browser) and the server (Node.js) should run the same code, it can easily be accomplished with minimal amount of code-duplication. And such code-duplication can actually be good reducing the number of dependencies that could break in some future version of the software.
Just saying don't throw out the Common-JS sub-system with the bathwater.
The problem with ES6 modules (imo) is it does not support sync loading of dynamic imports, so you have to figure out how to handle the Promise.
Just saying don't throw out the Common-JS sub-system with the bathwater.
The problem with ES6 modules (imo) is it does not support sync loading of dynamic imports, so you have to figure out how to handle the Promise.