Skip to content

Commit 8058f73

Browse files
authored
Standardise function usage (#175)
1 parent 4d931c8 commit 8058f73

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

resources/js/ssr.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ createServer((page) =>
1212
page,
1313
render: renderToString,
1414
title: (title) => title ? `${title} - ${appName}` : appName,
15-
resolve: resolvePage,
15+
resolve: (name) => resolvePageComponent(`./pages/${name}.vue`, import.meta.glob<DefineComponent>('./pages/**/*.vue')),
1616
setup: ({ App, props, plugin }) =>
1717
createSSRApp({ render: () => h(App, props) })
1818
.use(plugin)
@@ -23,9 +23,3 @@ createServer((page) =>
2323
}),
2424
{ cluster: true },
2525
);
26-
27-
function resolvePage(name: string) {
28-
const pages = import.meta.glob<DefineComponent>('./pages/**/*.vue');
29-
30-
return resolvePageComponent<DefineComponent>(`./pages/${name}.vue`, pages);
31-
}

0 commit comments

Comments
 (0)