Quantifying Default Exports
zenparsing at gmail.com
Tue Jul 22 20:43:42 PDT 2014
> We then conditionally add this wrapper based on detecting if the import is
> an ES6 module. This is the same method we have for AMD compilations at the
> moment, which seems to have been working well.
Just a side note, but for performance reasons in a real runtime system you
can't pre-determine whether the target is an ES6 module or not - that would
imply double-parsing and would necessarily be heuristic and incomplete.
In the end, either the import side or some preconfigured application state
will have to explicitly specify which targets are ES6 and which are not.
I've worked though most of these issues already in es6now, which provides a
complete picture of a backward compatible ES6 module system running on Node.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss