-
-
Notifications
You must be signed in to change notification settings - Fork 189
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
[@vitejs/plugin-vue] When using the same Vue component in "popup" and "content UI", modifying the Vue component content will crash the popup after hot update. #270
Comments
@xbears Thanks for sharing! I could not reproduce the error with your ZIP on Mac, I'll give it a go on windows later today. Videosmall.mp4In the meantime, could you re-upload the reproduction with the lockfile? Including lockfiles is important so maintainers have the exact set of dependencies you had while creating the reproduction. It also tells us which package manager was being used, which is also important to reproducing some errors (here I guessed PNPM because of the If this isn't a Windows-only issue, my guess is it was an issue with Vite 5 that's been fixed. Although, I don't kno because I don't have your lockfile. I was using |
Thanks for your reply, I tested it using a mac and it still reproduces, see the video below, I attached the zip with the lock, also the version of Vite it uses is update: VideoScreen.Recording.2023-12-12.mp4 |
I was able to reproduce, and this does only happen if re-using the component between entrypoints. Specifically, between a content script and HTML page. Doesn't happen between multiple UIs and doesn't happen between multiple content scripts. Something weird must be going on between the HTML's HMR and the content script's bundling. Maybe they're getting combined somehow? They should be completely separate. |
@aklinker1 I'm not sure if this helpful but it could be similar to this issue nuxt-modules/storybook#428 (comment)
|
@DaPotatoMan thanks for sharing. I've seen that before, but if I inspect the plugins, there's only 1 vue plugin per I think the solution might be to use the SSR tools vite provides to render the other files rather than using |
Describe the bug
When using the same Vue component in "popup" and "content UI", modifying the Vue component content will crash the popup after hot update.
To Reproduce
wxt-demo.zip
pnpm install
pnpm run dev
HelloWorld.vue
Screenshots
Environment
The text was updated successfully, but these errors were encountered: