-
Hi developers! Asking for help with register vue package in Inertia JS. The basic init code of Inertia is: I just need to register Vue-Toastification plugin, but have no idea what to do. I try import package before and call it inside use(), but nothing happened. What the secret is? |
Beta Was this translation helpful? Give feedback.
Answered by
ajnsn
Jul 27, 2021
Replies: 1 comment 1 reply
-
@Macartini Just add it to the import Toast from 'vue-toastification'
const options = {
// You can set your default options here
};
...
setup({ el, App, props, plugin }) {
createApp({ render: () => h(App, props) })
.use(plugin)
.use(Toast, options)
.mount(el)
},
... Taken from Vue Toastification (for Vue 3) Plugin registration |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
reinink
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@Macartini Just add it to the
createApp
chain as.use(Toast, options)
, e.g.Taken from Vue Toastification (for Vue 3) Plugin registration