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

"Uncaught SyntaxError: Identifier 'useCallback' has already been declared" when imported explicitly #10

Closed
lsdsjy opened this issue Aug 25, 2021 · 2 comments

Comments

@lsdsjy
Copy link

lsdsjy commented Aug 25, 2021

My configuration for a vite + react project is as follows:

    AutoImport({
      imports: ['react'],
    }),

When I installed and configured this plugin, started the vite server and opened the page, there's this error as the title suggests. I suppose this plugin should not conflict with existing imports.

@antfu
Copy link
Member

antfu commented Aug 25, 2021

Can you share the file that causing the conflict?

@lsdsjy
Copy link
Author

lsdsjy commented Aug 25, 2021

https://github.com/lsdsjy/auto-import-bug-reprod
Here I made a fresh repo and reproduced the error "Uncaught SyntaxError: Identifier 'useState' has already been declared"

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