vue-youtube-embed
vue-youtube-embed copied to clipboard
Not compatible with Vue 3
Running into the following issue trying to use vue-youtube-embed
on Vue 3 RC
Installed vue-youtube
via npm
, and imported it into my project globally in main.js
(Vue 3 docs).
main.js
import { createApp } from 'vue'
import App from './App.vue'
import VueYoutube from 'vue-youtube'
createApp(App)
.use(VueYoutube)
.mount('#app')
In the console, I get the following error:
Uncaught TypeError: Cannot set property '$youtube' of undefined
Any ideas? Thanks!
Unfortunately Vue 3 introduced some breaking changes... I fixed them on my own but ultimately decided to write a new improved package. You can check it out here
Published a lightweight component that works with both Vue 2/3
https://github.com/wobsoriano/vue-lite-youtube-embed