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

what i need to parse react code #11

Open
andriyor opened this issue Mar 24, 2024 · 3 comments
Open

what i need to parse react code #11

andriyor opened this issue Mar 24, 2024 · 3 comments

Comments

@andriyor
Copy link

I want to generate a graph of react components but have
Error: Parse error @:9:11
on a small component without dependencies

@thepassle
Copy link
Owner

could you share a minimal reproduction?

@andriyor
Copy link
Author

Sorry for not sharing this initially
https://github.com/andriyor/next-module-graph/blob/main/graph.ts

@thepassle
Copy link
Owner

No worries :) It seems like you're running into this: guybedford/es-module-lexer#47

We could make the import analysis pluggable so you can opt in to using typescript instead of es-module-lexer, we do already have code to analyse imports/exports that would be needed to achieve this here: https://github.com/thepassle/module-utils?tab=readme-ov-file#importsexports

but im not sure when i'll be able to get to this

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

2 participants