You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 25, 2018. It is now read-only.
Related to ES6 modules, #5, and following a lengthy discussion in npm/npm#8222. Obviously, I'm not talking about require() here, changing it would be insane. But since ES6 module loader would be completely different, we might as well consider to get rid of that. That's why:
the name of the file package.json doesn't make sense anymore with ES6 modules, because it's a CommonJS name
this is an extra disk read each time something is required. Not a lot, but since module loading happens every time on startup, every bit counts
if we implement it in new loader, it'll become a standard and have to be implemented in all module loaders (e.g. browserify, nexe, etc.), therefore increasing maintenance burden on the entire community
there is an idea to move all config files in .config (.config/package.json npm/npm#8159), and this implicit dependency in all loaders only makes it harder
Instead of this, I suggest everyone to just use /index.js in ES6 modules. Maybe use /lib/index.js as a fallback (since most of the packages define "main": "lib/index.js" anyway, but I'm not sure if it's worth it.