UNPKG

polen

Version:

A framework for delightful GraphQL developer portals

32 lines 1.17 kB
import type { VitePluginJson } from '#lib/vite-plugin-json/index'; import { type ComputedRef } from '@vue/reactivity'; import type { Plugin } from 'vite'; interface ReactiveDataOptions { /** * Virtual module ID (e.g., 'virtual:polen/navbar') that this data will be exported from. * The appropriate extension will be appended automatically based on moduleType. */ moduleId: string; /** * The reactive data to expose. * Can be either: * - A Vue computed ref (recommended) * - A function that returns reactive data * - A reactive value directly */ data: ComputedRef<object | unknown[]> | (() => object | unknown[]) | object | unknown[]; /** * JSON codec to use (e.g., superjson) * Default: JSON * Only used when includeJsonPlugin is true */ codec?: VitePluginJson.Codec; /** * Custom plugin name. Can use to help identify this plugin in logs if using many instances of this plugin. @default 'reactive-data' */ name?: string; } export declare const create: (options: ReactiveDataOptions) => Plugin; export {}; //# sourceMappingURL=vite-plugin-reactive-data.d.ts.map