32 ms·
Modules weren't production-grade until Node version 14. Before that, it used CommonJS modules ("require" instead of "import"). It's because Node was invented b
by jdlshore 6y ago
Modules weren't production-grade until Node version 14. Before that, it used CommonJS modules ("require" instead of "import").
It's because Node was invented before EcmaScript modules existed. CommonJS worked well and supporting both was awkward, so the transition took a while.