UNPKG

637 BTypeScriptView Raw
1import type { IProjectConfig } from '@tarojs/taro/types/compile';
2type WebpackMerge = (...configs: Array<object | null | undefined>) => object;
3export interface ConfigEnv {
4 /** taro 当前执行的命令 */
5 command: string;
6 /** 当前模式 (mode) */
7 mode: string;
8}
9export type UserConfigFn = (merge: WebpackMerge, env: ConfigEnv) => IProjectConfig | Promise<IProjectConfig>;
10export type UserConfigExport = IProjectConfig | Promise<IProjectConfig> | UserConfigFn;
11/**
12 * @since v3.6.9
13 * @warning 暂不支持 react native
14 */
15export declare function defineConfig(config: UserConfigExport): UserConfigExport;
16export {};