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
vite 3 + vue 3
ssr.js
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