import { Plugin } from 'vite'; import { Options as GlobbyOptions } from 'globby'; export interface Options { /** * Enable debug logging */ debug?: boolean; /** * Locale top level directory paths ordered from least specialized to most specialized * e.g. lib locale -> app locale * * Locales loaded later will overwrite any duplicated key via a deep merge strategy. */ paths: string[]; /** * i18next namespace * * @default 'translation' */ i18nNS?: string | false; /** * Glob patterns to match files * * @default ['**\/*.json', '**\/*.yml', '**\/*.yaml'] */ include?: string[]; /** * custom globby options */ globbyOptions?: GlobbyOptions; } export interface ResBundle { [lang: string]: Record; } declare const factory: ({ paths, include, globbyOptions, i18nNS, debug, }: Options) => Plugin; export default factory;