You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
to package.json for nuxt apps. This seems to cause HMR to break when using vue-toast-notifications.
updating to leave vue-toast-notification dependencies unchanged:
I'm not sure whether to update pinia fix to apply only to pinia (e.g. "pinia": { "vue" : "latest" }) or do the above, both will work but I believe the pinia scoped latest only results in more versions of vue in the project than necessary.
The text was updated successfully, but these errors were encountered:
idlethumbs
changed the title
Hot Module Reload breaking on nuxt 3 vue 3
Hot Module Reload breaking on nuxt 3 vue 3 with Pinia
Jan 11, 2024
@ankurk91
when i have time i will create a repo with minimum repro, it should be a fresh nuxt app (npx nuxi init) and then adding the vue version override that pinia asks for, we shouldn't need to install pinia to re-create the problem, but i can add it as it's relevant.
the problem with an online sandbox/codepen etc is I'm not sure if they implement their own version of HMR when code changes are made
I'm submitting a ... (check one with "x")
Tell about your platform
Current behavior
when importing useToast; HMR stops working in my nuxt app, browser refresh must be forced,
HMR updates still appear in the terminal.
upon removing the line with
import {useToast} from 'vue-toast-notification'
and restarting server HMR starts working again as expected.
Expected behavior
HMR is not affected by importing useToast
Minimal reproduction of the problem with instructions
Upon investigation - discovered this due to versioning conflicts,
Pinia documentation suggests adding :
to
package.json
for nuxt apps. This seems to cause HMR to break when using vue-toast-notifications.updating to leave vue-toast-notification dependencies unchanged:
fixes the issue and HMR works again
I'm not sure whether to update pinia fix to apply only to pinia (e.g. "pinia": { "vue" : "latest" }) or do the above, both will work but I believe the pinia scoped latest only results in more versions of vue in the project than necessary.
The text was updated successfully, but these errors were encountered: