-
Notifications
You must be signed in to change notification settings - Fork 84
Default exports #143
Comments
this normally happen when you have a linked pkg that contains recast as a dep, while you have another recast dep that does the parsing. Even if the version of the recast pkgs are the same, it seems to be a problem with the way recast compare references. Nothing to do with the transpiler IMO. |
@caridy I did a bit more digging based on what you said and I found that the problem stems from the fact that recast depends on a different esprima than the version es6-module-transpiler depends on. If I adjust recast to have the same dependency then it works, otherwise not. |
It might be valuable to put some documentation up somewhere that in order to use es6-module-transpiler with other recast transformers you need to pass esprima into recast.parse() and it has to be Alternatively, perhaps exporting esprima from es6-module-transpiler would be a good choice. Allowing people to do |
@matthewrobb Care to share some more details as to how you resolved this issue? |
I believe the current plan is to standardize on using esprima-fb instead of esprima#harmony. That way npm can properly dedupe and everyone will be happy 😉 |
I think we can close this one now. |
Maybe this should be reopened. With export * from './foo'; I'm seeing this error:
This export-from syntax is suppose to be supported, correct? |
I may be missing something but I cannot get default exports to work with the current or previous few versions of es6-module-transpiler.
Error:
When looking a little deeper it appears that the ast node used in exports.js has the default property undefined no matter what:
The text was updated successfully, but these errors were encountered: