Maronato / vue-toastification

Vue notifications made easy!
https://vue-toastification.maronato.dev
MIT License
3.03k stars 139 forks source link

Doesn't work with Vue 2.7.0+ #355

Open samit4me opened 1 year ago

samit4me commented 1 year ago

Versions

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

Additional context

mavyfaby commented 1 year ago

Any updates?

samit4me commented 1 year ago

Any updates?

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

mavyfaby commented 1 year ago

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!");
klemza commented 1 year ago

any updates in the foreseeable future?