Initial commit of adonisjs boilerplate
This commit is contained in:
30
config/inertia.ts
Normal file
30
config/inertia.ts
Normal file
@ -0,0 +1,30 @@
|
||||
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: {
|
||||
// user: (ctx) => ctx.inertia.always(() => ctx.auth.user),
|
||||
},
|
||||
|
||||
/**
|
||||
* Options for the server-side rendering
|
||||
*/
|
||||
ssr: {
|
||||
enabled: true,
|
||||
entrypoint: 'inertia/app/ssr.ts'
|
||||
}
|
||||
})
|
||||
|
||||
export default inertiaConfig
|
||||
|
||||
declare module '@adonisjs/inertia/types' {
|
||||
export interface SharedProps extends InferSharedProps<typeof inertiaConfig> {}
|
||||
}
|
Reference in New Issue
Block a user