Skip to content

Commit 2986a6f

Browse files
TimKunze96NicolasKion
authored andcommitted
Fix createSSRApp call and set clustering to true
1 parent 2bb5610 commit 2986a6f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

resources/js/ssr.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { createInertiaApp } from '@inertiajs/vue3';
22
import createServer from '@inertiajs/vue3/server';
33
import { renderToString } from '@vue/server-renderer';
44
import { resolvePageComponent } from 'laravel-vite-plugin/inertia-helpers';
5-
import { createApp, DefineComponent, h } from 'vue';
5+
import { createSSRApp, DefineComponent, h } from 'vue';
66
import { ZiggyVue } from 'ziggy-js';
77

88
const appName = import.meta.env.VITE_APP_NAME || 'Laravel';
@@ -14,13 +14,14 @@ createServer((page) =>
1414
title: (title) => `${title} - ${appName}`,
1515
resolve: resolvePage,
1616
setup: ({ App, props, plugin }) =>
17-
createApp({ render: () => h(App, props) })
17+
createSSRApp({ render: () => h(App, props) })
1818
.use(plugin)
1919
.use(ZiggyVue, {
2020
...page.props.ziggy,
2121
location: new URL(page.props.ziggy.location),
2222
}),
2323
}),
24+
{ cluster: true },
2425
);
2526

2627
function resolvePage(name: string) {

0 commit comments

Comments
 (0)