getBabelOpts.d.ts
1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
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 | object)[] | [string, any, (string | undefined)?])[];
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: env;
dynamicImportNode: boolean;
})[][];
sourceType: string;
babelrc: boolean;
cacheDirectory: string | boolean;
};
export {};