Initial commit of adonisjs boilerplate

This commit is contained in:
Mike Conrad
2025-05-16 20:31:14 -04:00
commit a34b0899ce
44 changed files with 11056 additions and 0 deletions

19
inertia/app/ssr.ts Normal file
View File

@ -0,0 +1,19 @@
import { createInertiaApp } from '@inertiajs/vue3'
import { renderToString } from '@vue/server-renderer'
import { createSSRApp, h, type DefineComponent } from 'vue'
export default function render(page: any) {
return createInertiaApp({
page,
render: renderToString,
resolve: (name) => {
const pages = import.meta.glob<DefineComponent>('../pages/**/*.vue', { eager: true })
return pages[`../pages/${name}.vue`]
},
setup({ App, props, plugin }) {
return createSSRApp({ render: () => h(App, props) }).use(plugin)
},
})
}