DEV Community

Discussion on: What the heck are CJS, AMD, UMD, and ESM in Javascript?

Collapse
 
karataev profile image
Eugene Karataev

If obj.js was exporting a function that returned an abject, well that would be different.

Agree. But in this case the exported function will be the same for all modules (i.e. the function will not be copied for every import).

Thread Thread
 
mudlabs profile image
Sam

Right