TL;DR: Breaking backwards compatibility is always painful but there's not one actual criticism of ES Modules as a spec here other than its incompatibility with CommonJS
That might sound irrelevant on the face of it, but it has very real consequences. For example, the following pattern is simply not possible with ESM: const someInitializedModule = require("module-name") (someOptions); Or how about this one? Also no longer possible: const app = express(); // ... app.use("/users", require("./routers/users")); Configurable modules and lazily loaded imports are both missing from the ES M…
import someModule from "module-name"
const someInitializedModule = someModule(someOptions)
A bit longer, but meh… const app = express();
app.use("/users", (await import("./routers/users")).default);
top-level await is a thing nowActually, the first example could be rewritten as
const someInitializedModule = (await import("module-name")).default(someOptions);
That «simply not possible» statement is simply not true