>
>
> In NodeJS, this can be through `package.json` properties which inform what
> module format the package is.
>

Right - although having a runtime system looking at json config files is a
terrible idea.  : )  In es6now, I'm experimenting with the following rule:

- If some folder that might be a "package" contains a "default.js" file,
then load it as an ES6 module/package.
- Otherwise, use the old-school algorithm (package.json or index.js).

In any case, it makes sense (when possible) to make the module vs. script
decision at package boundaries.
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to