-
Notifications
You must be signed in to change notification settings - Fork 137
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
Vue-toastification does not show toasts with vue 3 #354
Comments
I've spent the last day trying to understand why my Toasts work in development but not production 😓 . This bug report led me to the answer... I had |
Looks like the only place the options api is used is here: vue-toastification/src/components/VtToastContainer.vue Lines 215 to 221 in b34ea31
Every other component seems to only use |
Versions
2.0.0-rc.5
, andnext
version also.Describe the bug
I just installed this package like this:
main.ts
I use Pinia for state management. Somewhere in
./stores/AuthStore.ts
There is no toast shows at the page. In browser console there is this error:
Expected behavior
Toast is visible at the page.
Steps to reproduce
Install with this config files.
packages.json
webpack.config.js
Environment
I also try to use next version without success.
Cause
As lllopo mentioned in issue-305 while your plugin states it is for the composition API, it internally uses the options API for the components. So, setting
VUE_OPTIONS_API
to false in webpack actually breaks it. And it was my case.Temporary workaround
Set this
in webpack.config.js solves this issue, but It should be well documented in manual at least. It's a serous problem for all people trying to use this package with vue 3.
The text was updated successfully, but these errors were encountered: