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

Support JSX syntax #5

Open
jcdixon2 opened this issue Nov 6, 2021 · 4 comments
Open

Support JSX syntax #5

jcdixon2 opened this issue Nov 6, 2021 · 4 comments
Labels
enhancement New feature or request

Comments

@jcdixon2
Copy link

jcdixon2 commented Nov 6, 2021

Here are a couple of examples. I show the error message on the specific line referenced in the error.

                <FilterFieldClearButton
                  aria-label="Clear search"
                  onClick={() => {
                    setFilterValue('');
                    setSortedColumns(getFilteredColumns(''));
                  }}
                > 
                </FilterFieldClearButton>    ****** Parse error @:287:42
function SandboxApp() {
  return (
    <App>
      <DatagridInlineRowGroup licenseKey={licenseKey} />
    </App>  ****** Parse error @:9:11
  );
}
@TomerAberbach
Copy link
Owner

This package is pretty much a wrapper around es-module-lexer (see #1 (comment)), 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

@TomerAberbach TomerAberbach changed the title parse-imports chokes on some JSX Support JSX syntax Nov 6, 2021
@TomerAberbach TomerAberbach added the enhancement New feature or request label Nov 6, 2021
@jcdixon2
Copy link
Author

jcdixon2 commented Nov 7, 2021

Thanks. Hope to use parse-imports at some later date then when it supports JSX.

@ivands
Copy link

ivands commented Nov 30, 2023

Hope this will be added soon !

@TomerAberbach
Copy link
Owner

Out of curiosity, do y'all care about/use the dynamic import support of the package? Or just the static imports support?

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

No branches or pull requests

3 participants