UNPKG

@wuchale/vite-plugin

Version:

Protobuf-like i18n from plain code: Vite plugin

36 lines (35 loc) 1.08 kB
import { type Config } from 'wuchale'; type HotUpdateCtx = { file: string; server: { ws: { send: Function; }; moduleGraph: { getModulesByFile: Function; invalidateModule: Function; }; }; read: () => string | Promise<string>; timestamp: number; }; export declare function toViteError(err: unknown, adapterKey: string, filename: string): never; export declare class Wuchale { #private; name: string; constructor(loadConfig: () => Promise<Config>, root: string, hmrDelayThreshold?: number); configResolved: (config: { env: { DEV?: boolean; }; }) => Promise<void>; handleHotUpdate: (ctx: HotUpdateCtx) => Promise<never[] | undefined>; transform: { order: "pre"; handler: (code: string, id: string, options?: { ssr?: boolean | undefined; }) => Promise<import("wuchale").TransformOutputCode>; }; } export declare const wuchale: (configPath?: string, hmrDelayThreshold?: number) => Wuchale; export {};