From 0620dc56ddfb3a3454f09490a588df2429400e66 Mon Sep 17 00:00:00 2001 From: hemengke1997 <49073282+hemengke1997@users.noreply.github.com> Date: Tue, 28 Mar 2023 15:27:33 +0800 Subject: [PATCH] chore: typo --- src/plugin/index.ts | 6 +++--- src/plugin/utils/LocaleDetector.ts | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/plugin/index.ts b/src/plugin/index.ts index 0523137..55bd6a6 100644 --- a/src/plugin/index.ts +++ b/src/plugin/index.ts @@ -5,7 +5,7 @@ import { LocaleDetector } from './utils/LocaleDetector' import type { EnableParsersType } from './parsers' import { debug } from './utils/debugger' -export interface DetectI18nResourceOptions { +export interface I18nDetectorOptions { /** * @default * process.cwd() @@ -34,7 +34,7 @@ export interface DetectI18nResourceOptions { enabledParsers?: EnableParsersType } -export async function i18nDetector(options: DetectI18nResourceOptions) { +export async function i18nDetector(options: I18nDetectorOptions) { debug('i18nDetector options:', options) const localeDetector = new LocaleDetector({ @@ -47,7 +47,7 @@ export async function i18nDetector(options: DetectI18nResourceOptions) { await localeDetector.init() return { - name: 'vite:detect-i18n-resource', + name: 'vite:i18n-detector', enforce: 'pre', config: () => ({ optimizeDeps: { diff --git a/src/plugin/utils/LocaleDetector.ts b/src/plugin/utils/LocaleDetector.ts index 1829855..7fb428c 100644 --- a/src/plugin/utils/LocaleDetector.ts +++ b/src/plugin/utils/LocaleDetector.ts @@ -4,14 +4,14 @@ import uniq from 'uniq' import fg from 'fast-glob' import { normalizePath } from 'vite' import cloneDeep from 'clone-deep' -import type { DetectI18nResourceOptions } from '..' +import type { I18nDetectorOptions } from '..' import { AvailableParsers, DefaultEnabledParsers } from '../parsers' import { ParsePathMatcher } from './PathMatcher' import { PKGNAME, VIRTUAL } from './constant' import { debug } from './debugger' import { logger } from './logger' -export interface Config extends DetectI18nResourceOptions { +export interface Config extends I18nDetectorOptions { cwd: string }