-
Notifications
You must be signed in to change notification settings - Fork 39
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
Calling this.$toast.clear() doesn't clear any toasts (using Vite) #33
Comments
To follow up on this, I pulled in So, not working from |
Related stack overflow question: https://stackoverflow.com/questions/71929957/meforma-vue-toaster-clear-function-only-works-when-pulled-into-local-project-fo Could this issue be related to using |
Adding stackblitz (vite) example here too: https://stackblitz.com/edit/vitejs-vite-uqcdgd?file=src%2Fmain.js,src%2FApp.vue |
So after forking @meforma/vue-toaster, rewriting the Toaster in the composition API and changing the event bus to use Digging in further, I noticed in my vite.config.js
And now, the clear... is working. I don't necessarily know why it works when Vite stops optimizing it. Not sure how the Vite optimization works, but hey... |
This seems to be an issue with how Vite caches dependencies. duannx created an issue on Vite with this example: vitejs/vite#8158 which was apparently a duplicate of a previous issue: vitejs/vite#3910 |
any update on this? |
Hi! You can try it with this in your package.json: "devDependencies": {
"@meforma/vue-toaster": "stafyniaksacha/vue-toaster#feat/render-function",
} |
main.js
Example.vue
package.json
Ty, otherwise all works perfectly.
The text was updated successfully, but these errors were encountered: