CommandKitConfig
CommandKitConfig
interface CommandKitConfig {
plugins?: MaybeArray<CommandKitPlugin>[] | Array<CommandKitPlugin>;
rolldownPlugins?: any[];
entrypoints?: string[];
compilerOptions?: CommandKitCompilerOptions;
typescript?: {
/**
* Whether to ignore type checking during builds.
*/
ignoreBuildErrors?: boolean;
};
static?: boolean;
env?: Record<string, string>;
distDir?: string;
antiCrashScript?: {
/**
* Whether to enable the anti-crash script in development mode.
* @default true
*/
development?: boolean;
/**
* Whether to enable the anti-crash script in production mode. Usually, you should use other means to handle errors.
* @default false
*/
production?: boolean;
};
sourceMap?: {
/**
* Whether to enable source map generation in development mode.
*/
development?: boolean;
/**
* Whether to enable source map generation in production mode.
*/
production?: boolean;
};
typedCommands?: boolean;
disablePrefixCommands?: boolean;
showUnknownPrefixCommandsWarning?: boolean;
}
plugins
MaybeArray<CommandKitPlugin>[] | Array<CommandKitPlugin>
The plugins to use with CommandKit. Can be a single plugin, an array of plugins, or a nested array of plugins.
rolldownPlugins
any[]
The rolldown plugins to use with CommandKit.
entrypoints
string[]
The list of additional entrypoints to compile. Eg, dir
or dir/index.ts
or dir/*.ts
, etc.
Similarly, negative patterns can be used to exclude files. Eg, !dir/index.ts
or !dir/*.ts
, etc.
compilerOptions
The compiler options to use with CommandKit.
typescript
{ /** * Whether to ignore type checking during builds. */ ignoreBuildErrors?: boolean; }
The typescript configuration to use with CommandKit.
static
boolean
Whether to generate static command handler data in production builds.
env
Record<string, string>
Statically define the environment variables to use.
distDir
string
`dist`
The custom build directory name to use.
antiCrashScript
{ /** * Whether to enable the anti-crash script in development mode. * @default true */ development?: boolean; /** * Whether to enable the anti-crash script in production mode. Usually, you should use other means to handle errors. * @default false */ production?: boolean; }
The anti-crash script configuration.
sourceMap
{ /** * Whether to enable source map generation in development mode. */ development?: boolean; /** * Whether to enable source map generation in production mode. */ production?: boolean; }
Whether or not to enable the source map generation.
typedCommands
boolean
true
Whether or not to enable the typed commands.
disablePrefixCommands
boolean
false
Whether or not to disable the prefix commands.
showUnknownPrefixCommandsWarning
boolean
true
Whether or not to show a warning when a prefix command is not found. This only affects development mode.