Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reexporting is not supported #44

Closed
timbset opened this issue Jan 25, 2017 · 6 comments
Closed

Reexporting is not supported #44

timbset opened this issue Jan 25, 2017 · 6 comments

Comments

@timbset
Copy link

timbset commented Jan 25, 2017

I have this code:

export * as util from './util';

Checking of this files throws the type of null error
I fixed it by refactoring:

import * as util from './util';
export { util };

Anyway it will be great to fix it

@danielstjules
Copy link
Owner

Sorry! Updating ES6 support this week and looking to do a major rewrite. This has been fixed in master :)

@danielstjules
Copy link
Owner

Actually, I don't think export * as util from './util'; is valid. Babel fails to transpile it as well. I think this should have been export * from './util';

@davidfirst
Copy link
Contributor

davidfirst commented Mar 20, 2017

I just came across the exact same issue.
Babel actually supports it with stage-0 and stage-1. Here is a demo.

I've seen some projects using this syntax, and it'll be nice to support it.
By the way, from a quick check, it seems as if Acorn recognizes it correctly, and the error comes from Inspector.prototype._walk.

Thank you for the great project!

@danielstjules
Copy link
Owner

My mistake, forgot to follow up :) Support was added https://github.com/danielstjules/jsinspect/blob/master/lib/parser.js#L26 The whole library has been rewritten, and a much better 0.10 release can be expected today or tomorrow!

@danielstjules
Copy link
Owner

0.10 released, and that indeed fixed it :)

@davidfirst
Copy link
Contributor

Awesome! Thank you so much!
I just tested it and it's working perfectly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants