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
multiple vite bundle import in one page throw:Uncaught SyntaxError: Identifier 'React' has already been declared #10822
Comments
if one is import with vite dev model it's works well |
Hello @joebnb. Please provide a minimal reproduction using a GitHub repository or StackBlitz. Issues marked with |
this seems still to be a bug, at least with Nuxt 3. Vite injected this import at the top of our minified bundles with no regard for variable collision import { h } from '/_nuxt/node_modules/.vite/deps/vue.js?v=8f0c34a1'; |
vuejs/core#7206 vue3 also have this problem |
Describe the bug
when multiple vite bundle import in one page will throw " Identifier 'Fa' has already been declared " in console.
bundle 1 fold level 1 screenshot:
the bundle 2 fold level 1 screenshot:
i have already to try:
it's still output some mangled variable was decleared.
when set both bundle with minify false it output:
my vite config is
how could i to fix it, PuruVJ/vite-preset-react#5 i found this issue during write this,not sure did this is helpful to solve this.
Reproduction
no
Steps to reproduce
No response
System Info
Used Package Manager
npm
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: