ModuleImport

Karolis Narkevičius karolis.n at gmail.com
Tue Jun 24 07:02:10 PDT 2014


>  The reason why that's problematic is that it makes adding a default
>> export at a later date a breaking change for consumers of the module.  You
>> would essentially have to decide whether your module is going to have a
>> default export (other than the module instance object of course) when you
>> first create it and never change it thereafter.
>>
>
> That sounds perfectly reasonable to me.
>

As in yes - you want to decide on the API of your module upfront. If you
want to add `default` only later - that probably means you intend the
module to be used quite differently anyway, so it's fine to have a breaking
API change for that sort of thing.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20140624/9a1dd6ac/attachment.html>


More information about the es-discuss mailing list