DEV Community

loading...

Discussion on: How to migrate your library from Vue2 to Vue3

Collapse
denrique88 profile image
denrique88

Hi !

I'm learning Vue and I started a personal project using Vue 3.0.
Many libraries are not ready to use with Vue 3, so I was interested by your article. Thank you ! I wanted to test your changes in Toasted in my project.
So I installed Toasted with npm targeting the github repo on #next branch.

Unfortunately, I wasn't able to do it work.
When adding Toasted in my main.js file :


import Toasted from 'vue-toasted';

const app = createApp(App);
app.use(store)
.use(router)
.use(Toasted)
.mount('#app');

I get an error in the console :

Uncaught TypeError: t.prototype is undefined
    install vue-toasted.min.js:1
    use runtime-core.esm-bundler.js:3164

Maybe I'm doing something wrong or misunderstanding... do you have an idea of why this error is happening ?

Thank you !

Collapse
alvarosaburido profile image
Alvaro Saburido Author

Hey!

Even if I did the PR to vue-toasted library and was merged, I think they haven't finished migrating for support of vue3 yet, I would suggest opening a ticket here github.com/shakee93/vue-toasted/is...