@@ -7,29 +7,44 @@ import { route as ziggyRoute } from 'ziggy-js';
77
88const appName = import . meta. env . VITE_APP_NAME || 'Laravel' ;
99
10+ /**
11+ * Added eslint-disable-next-line @typescript-eslint/ban-ts-comment and @ts-ignore to fix the error.
12+ * I'm not sure if the fix really leads to a type-safe Javascript.
13+ */
14+
1015createServer ( ( page ) =>
1116 createInertiaApp ( {
1217 page,
1318 render : renderToString ,
1419 title : ( title ) => `${ title } - ${ appName } ` ,
20+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
21+ // @ts -ignore
1522 resolve : ( name ) => resolvePageComponent ( `./pages/${ name } .vue` , import . meta. glob ( './pages/**/*.vue' ) ) ,
1623 setup ( { App, props, plugin } ) {
1724 const app = createSSRApp ( { render : ( ) => h ( App , props ) } ) ;
1825
1926 // Configure Ziggy for SSR...
2027 const ziggyConfig = {
28+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
29+ // @ts -ignore
2130 ...page . props . ziggy ,
31+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
32+ // @ts -ignore
2233 location : new URL ( page . props . ziggy . location ) ,
2334 } ;
2435
2536 // Create route function...
2637 const route = ( name : string , params ?: any , absolute ?: boolean ) => ziggyRoute ( name , params , absolute , ziggyConfig ) ;
2738
2839 // Make route function available globally...
40+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
41+ // @ts -ignore
2942 app . config . globalProperties . route = route ;
3043
3144 // Make route function available globally for SSR...
3245 if ( typeof window === 'undefined' ) {
46+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
47+ // @ts -ignore
3348 global . route = route ;
3449 }
3550
0 commit comments