You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

43 lines
1.2 KiB

import { IConfig } from '@umijs/types';
declare type env = 'development' | 'production';
interface IOpts {
config: IConfig;
env: 'development' | 'production';
targets?: object;
}
export declare function getBabelPresetOpts(opts: IOpts): {
nodeEnv: "development" | "production";
dynamicImportNode: boolean;
autoCSSModules: boolean;
svgr: boolean;
env: {
targets: object | undefined;
};
import: never[];
};
export declare function getBabelOpts({ cwd, config, presetOpts, }: {
cwd: string;
config: IConfig;
presetOpts: object;
}): {
presets: (string | Function | [string, any, (string | undefined)?] | (string | object)[])[];
plugins: (string | Function | [string, any, (string | undefined)?])[];
sourceType: string;
babelrc: boolean;
cacheDirectory: string | boolean;
};
export declare function getBabelDepsOpts({ env, cwd, config, }: {
env: env;
cwd: string;
config: IConfig;
}): {
presets: (string | {
nodeEnv: "development" | "production";
dynamicImportNode: boolean;
})[][];
sourceType: string;
babelrc: boolean;
cacheDirectory: string | boolean;
};
export {};