-
-
Notifications
You must be signed in to change notification settings - Fork 238
Direct export throws SyntaxError #17
Comments
Okay, are you sure that App has default exports? Cuz if it does not, you will get this error Even my vscode complains on the syntax above.
|
Yes it does. see fork |
It says |
Sorry about that. Fixed the import. Still same error |
If acorn complains that means that you have a syntax error |
@VanthiyaThevan is it possible that you are using some feature that needs some babel plugin, or you are just using the original repo code? |
I'm actually getting this error (Unexpected token) and error reporting from acorn really doesn't help. |
@VanthiyaThevan i checked the project, first there is syntax error here react example after i fixed those, build is passing fine, hope this helps |
Also please, make sure you references make sense |
the difference to this working vs the the error export App from './App' This compiles as expected. import App from './App'
export { App }; @devmondo It is possible. I've switched to using presets |
@VanthiyaThevan thanks for update, can you try this |
@devmondo |
|
I see now. the syntax I am using are part of proposal
and stage 1 supported by babel and not by acorn. |
I see. I think we can use babel AST as an alternative.
|
|
Thanks for the quick response. But if I specify my own |
Sorry, my bad. FIxed in |
i can confirm that Error reporting in |
Nice! @devmondo Thanks, |
Thanks. This works. Yes the error message is very cool. Will try it on a real project and let you know. |
Hi! Thanks again for submitting this issue, it led to an amazing improvement on BabelPlugin and the core itself. Cheers. |
Thanks. I'm going to try this on a fairly large project. |
when you export from another module like
export App from './App'
throwsSyntaxError
Fork
The text was updated successfully, but these errors were encountered: