Comment

Comment by galaxyLogic

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.

parent galaxyLogic 17 days ago

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton