UNPKG

@adonisjs/inertia

Version:

Official Inertia.js adapter for AdonisJS

33 lines (32 loc) 802 B
import type { PluginFn } from 'edge.js/types'; /** * Edge.js plugin that registers Inertia.js tags and global functions * * This plugin adds the @inertia and @inertiaHead tags to Edge templates, * along with global helper functions for rendering Inertia pages. * * @returns Edge plugin function that registers Inertia functionality * * @example * ```js * // Configure in config/edge.ts * import { edgePluginInertia } from '@adonisjs/inertia/plugins/edge' * * edge.use(edgePluginInertia()) * ``` * * @example * ```edge * {{-- Use in Edge templates --}} * <!DOCTYPE html> * <html> * <head> * @inertiaHead() * </head> * <body> * @inertia({ id: 'app', class: 'min-h-screen' }) * </body> * </html> * ``` */ export declare const edgePluginInertia: () => PluginFn<undefined>;