[AskJS] Do you consider ESM to have more benefits than drawbacks in node?

This page summarizes the projects mentioned and recommended in the original post on /r/javascript

Our great sponsors
  • SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • node

    Node.js JavaScript runtime ✨🐢🚀✨

  • Yes, but you're missing the fact that sync file access is much faster than async. I think this contributes to the fact that esm is questionably slower in some cases https://github.com/nodejs/node/issues/44186

  • TypeScript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • Because it's implicit, CJS creates a bunch of resolution issues with Typescript, to the point where if you want to code for the browser, you can't easily can't and have to either recompile with something like webpack to rewrite the module resolution, or add .js to all your TS imports, which already looks weird (you'd think you're importing the .ts files). sip.js has that issue.

  • SurveyJS

    Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.

    SurveyJS logo
  • SIP.js

    A simple, intuitive, and powerful JavaScript signaling library

  • Because it's implicit, CJS creates a bunch of resolution issues with Typescript, to the point where if you want to code for the browser, you can't easily can't and have to either recompile with something like webpack to rewrite the module resolution, or add .js to all your TS imports, which already looks weird (you'd think you're importing the .ts files). sip.js has that issue.

  • extless-loader

    Loads Node ESM in a more compatible way by making extensions optional.

  • Same for extension-less loading, I wrote a loader for this: https://github.com/tbranyen/extless-loader. Perhaps it will be an option in the future.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts