Skip to content

BasePluginOptions

Base configuration options type for all plugins.

typescript
import type { BasePluginOptions } from '@meng-xi/vite-plugin/factory'

Type Definition

typescript
interface BasePluginOptions {
	enabled?: boolean
	verbose?: boolean
	errorStrategy?: 'throw' | 'log' | 'ignore'
}

Properties

PropertyTypeDefaultDescription
enabledbooleantrueEnable plugin
verbosebooleantrueShow verbose logs
errorStrategy'throw' | 'log' | 'ignore''throw'Error handling strategy

Error Strategies

StrategyBehavior
throwLog error and throw
logLog error, continue
ignoreLog error, continue

Extending

typescript
interface MyPluginOptions extends BasePluginOptions {
	outputPath: string
	format?: 'json' | 'yaml'
}

Released under the MIT License.