I cannot include Buefy in Vue3

4.5k views Asked by At

someone knows how can I include Buefy in Vue3, becuause I am doing this (main.js) but I get an error:

import { createApp } from "vue";
import App from "./App.vue";
import router from "./router";
import store from "./store";
import Buefy from 'buefy';
import 'buefy/dist/buefy.css';

createApp(App)
  .use(store)
  .use(router)
  .use(Buefy)
  .mount("#app");

And the error is:

Uncaught TypeError: Vue.prototype is undefined
1

There are 1 answers

0
David Ducrest On

Buefy support for Vue3 is still in the planning phase. I think that its going to a while.

https://github.com/buefy/buefy/issues/2505

As of 7 Dec 2020: https://github.com/buefy/buefy/issues/2505#issuecomment-739899697

Btw there is a new branch and I'll try to migrate other components to show you my main idea:

  • Typescript
  • Options API

In my opinion the problem is not migrate all to Vue 3 but maintain two versions. Vue 3 is the future but official and not official libraries and frameworks (for example Nuxt) are not ready so I don't understand the really need at the moment.