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

Bug: parse named import error when use [ import {hello} from 'hello' ] #22

Open
Helium-Z opened this issue Jun 9, 2021 · 0 comments
Open

Comments

@Helium-Z
Copy link

Helium-Z commented Jun 9, 2021

Thanks for your tool! I just found a bug to notice you.

https://github.com/dev-cprice/parse-static-imports/blob/66eb33a5db1d232eab959a4ca65ebac2053f6b1b/src/parseNamedImports.js#L24

substring(startCurlyIdx + 1, endCurlyIdx - 1) should be substring(startCurlyIdx + 1, endCurlyIdx). Because the char pointed by the second parameter of substring() is not included in the result.

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

1 participant