Open jcdixon2 opened 2 years ago
This package is pretty much a wrapper around es-module-lexer
(see https://github.com/TomerAberbach/parse-imports/issues/1#issuecomment-840175682), which doesn't support JSX. I've considered writing my own lexer in Rust so I'll leave this open as a feature request for JSX support.
For now I would recommend transpiling and then parsing for imports using this package. Also, depending on what you use to transpile you may be able to get the imports as part of that step
Thanks. Hope to use parse-imports at some later date then when it supports JSX.
Hope this will be added soon !
Out of curiosity, do y'all care about/use the dynamic import support of the package? Or just the static imports support?
Here are a couple of examples. I show the error message on the specific line referenced in the error.