project-nomad/admin/config/inertia.ts
2025-11-18 15:51:45 -08:00

31 lines
763 B
TypeScript

import { SystemService } from '#services/system_service'
import { defineConfig } from '@adonisjs/inertia'
import type { InferSharedProps } from '@adonisjs/inertia/types'
const inertiaConfig = defineConfig({
/**
* Path to the Edge view that will be used as the root view for Inertia responses
*/
rootView: 'inertia_layout',
/**
* Data that should be shared with all rendered pages
*/
sharedData: {
appVersion: () => SystemService.getAppVersion(),
},
/**
* Options for the server-side rendering
*/
ssr: {
enabled: false,
entrypoint: 'inertia/app/ssr.tsx'
}
})
export default inertiaConfig
declare module '@adonisjs/inertia/types' {
export interface SharedProps extends InferSharedProps<typeof inertiaConfig> {}
}