This commit is contained in:
F4ilji
2025-05-06 10:47:12 +05:00
parent 6f4da2e704
commit 8dadd19adc
7 changed files with 55 additions and 40 deletions
+8 -5
View File
@@ -1,12 +1,10 @@
import '../css/app.css';
import { createInertiaApp } from '@inertiajs/vue3'
import createServer from '@inertiajs/vue3/server'
import { renderToString } from '@vue/server-renderer'
import { createSSRApp, h } from 'vue'
import { ZiggyVue } from '../../vendor/tightenco/ziggy/dist/vue.m';
createServer(page =>
createInertiaApp({
page,
@@ -16,9 +14,14 @@ createServer(page =>
return pages[`./Pages/${name}.vue`]()
},
setup({ App, props, plugin }) {
return createSSRApp({
const ssrApp = createSSRApp({
render: () => h(App, props),
})
});
ssrApp.config.errorHandler = () => null;
ssrApp.config.warnHandler = () => null;
return ssrApp
.use(plugin)
.use(ZiggyVue, {
...page.props.ziggy,
@@ -26,4 +29,4 @@ createServer(page =>
});
},
}),
)
);