Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doesn't work with Vue 2.7.0+ #355

Open
samit4me opened this issue Nov 30, 2022 · 4 comments
Open

Doesn't work with Vue 2.7.0+ #355

samit4me opened this issue Nov 30, 2022 · 4 comments
Labels
Type: Bug Something isn't working

Comments

@samit4me
Copy link

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

@samit4me samit4me added the Type: Bug Something isn't working label Nov 30, 2022
@mavyfaby
Copy link

Any updates?

@samit4me
Copy link
Author

Any updates?

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

@mavyfaby
Copy link

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
Copy link

klemza commented Jun 28, 2023

any updates in the foreseeable future?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants