Closed sevenmay closed 1 year ago
The documentation says
A plugin is defined as either an object that exposes an install() method, or simply a function that acts as the install function itself.
I dont see anything broken https://jsfiddle.net/ankurk91/2ou37bc8/
Hope you are importing the plugin like this, version 6 uses named imports
import {LoadingPlugin} from 'vue-loading-overlay';
// create app code goes here
app.use(LoadingPlugin)
Hope you are importing the plugin like this, version 6 uses named imports
Yes
import {LoadingPlugin} from 'vue-loading-overlay';
It works with Vue 3.2.35 but not with Vue 3.2.45.
It's very strange. I created a plugin (TestPlugin) like yours without problem, but LoadingPlugin doesn't works.
https://stackblitz.com/edit/vue-ljlzhx?file=src%2Fmain.js
You can see the warning in the console.
const TestPlugin = (app, props = {}, slots = {}) => {};
const data = {};
export { TestPlugin, data };
import { createApp } from 'vue';
import App from './App.vue';
import { VueLoading } from 'vue-loading-overlay';
import { TestPlugin } from './TestPlugin';
const app = createApp(App);
app.use(VueLoading);
app.use(TestPlugin);
app.mount('#app');
Your code indicate that you did not follow documentation
I'm submitting a ... (check one with "x")
Tell about your platform
Current behavior
Can't install the plugin.
Expected behavior
That the plugin installation works
This doesn't work anymore.
See vue docs: https://vuejs.org/guide/reusability/plugins.html#writing-a-plugin
Thanks!