Hacker News new | ask | show | jobs
by nicolae_g_iotu 1082 days ago
My opinion is that a moderate approach is required, maybe a new solution needs to be discovered.

I think ESM modules are most of the times desirable by developers of small to mid size packages. These developers want to have their packages used both on server and in browser.

On the other side heavy duty packages which are able to generate production loads (see Fastify) should use CommonJS. In my opinion production loads should not have importable elements, stay private and rather just run and get the job done. At the same time it is really not that important for such loads to have good loading times for the micro packages used.

This is debatable, but yet another aspect to consider: server side production loads must use CommonJS.