4 ms·
I prefer CommonJS. It's so simple. You assign the dependency to a variable and that's it. I still need to look up the syntax every time I use ESM.
by Kiro 5y ago
I prefer CommonJS. It's so simple. You assign the dependency to a variable and that's it. I still need to look up the syntax every time I use ESM.
- afiori 5y agoit is simple to write, it is not simple at all how strings are converted into paths. honestly tough, esm is more complex than it should (especially regarding how live exports happen)
- tehbeard 5y ago> You assign the dependency to a variable and that's it erm, how is that any simpler than `export const/function/class $defintion` ? I guess if you only touch JS once in a blue moon it's difficult to remember? Also CommonJS has some acknowledged issues around cyclic dependencies, and being incredibly fudgeable at runtime that makes static analysis and linting a pain.