Maronato / vue-toastification

Vue notifications made easy!

Home Page:https://vue-toastification.maronato.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Doesn't work with Vue 2.7.0+

samit4me opened this issue · comments

Versions

  • 1.7.14

Describe the bug

When attempting to use vue-toastification with Vue 2.7.0+ the composition api doesn't appear to work due to Vue 2 now having the Composition API built-in.

Expected behavior

Instead of breaking the build, it should work without throwing errors

Steps to reproduce

Reproduction demo.
Steps:

  1. Install normally
  2. Set up plugin
  3. Using composition api install
  4. Fails to build

Your Environment

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Additional context

Any updates?

Any updates?

I couldn't get it working so stuck with the options api

I ended up using the normal plugin registration:

Vue.use(Toast, options);

and then referenced the instance to my utils/toast.js:

import Vue from "vue";
export default Vue.$toast;

and use it as usual:

import toast from "~/utils/toast";

toast.success("It worked!");
commented

any updates in the foreseeable future?