mirror of
https://github.com/Crosstalk-Solutions/project-nomad.git
synced 2026-03-28 03:29:25 +01:00
32 lines
818 B
TypeScript
32 lines
818 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(),
|
|
environment: process.env.NODE_ENV || 'production',
|
|
},
|
|
|
|
/**
|
|
* 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> {}
|
|
} |