vue3-perfect-scrollbar icon indicating copy to clipboard operation
vue3-perfect-scrollbar copied to clipboard

[Vue warn]: A plugin must either be a function or an object with an "install" function. with ssr

Open samehdoush opened this issue 3 years ago • 0 comments

vite 3 + vue 3

ssr.js

import { createSSRApp, h } from 'vue';
import { renderToString } from '@vue/server-renderer';
import { createInertiaApp , Link} from '@inertiajs/inertia-vue3';
import createServer from '@inertiajs/server';
import PerfectScrollbar from 'vue3-perfect-scrollbar'
createServer((page) =>
    createInertiaApp({
   .............
        setup({ app, props, plugin }) {
            return createSSRApp({ render: () => h(app, props) })
                .use(plugin)
                .component('Link', Link)
                .use(PerfectScrollbar)
                .use(ZiggyVue, {
                    ...page.props.ziggy,
                    location: new URL(page.props.ziggy.location),
                });
        },
    })
);

alert console : [Vue warn]: A plugin must either be a function or an object with an "install" function. [Vue warn]: Failed to resolve component: perfect-scrollbar If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement. TypeError: Invalid value used as weak map key

samehdoush avatar Aug 25 '22 22:08 samehdoush