-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.ts
More file actions
71 lines (66 loc) · 1.24 KB
/
types.ts
File metadata and controls
71 lines (66 loc) · 1.24 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
import CompressionPlugin = require('compression-webpack-plugin')
/**
* script-webpack-plugin 脚本资源 插件的可配参数
*/
export interface ScriptWebpackPluginOptions {
/**
* 启用缓存,指定缓存路径
*
* 默认development环境启用
*/
cacheDirectory?: string | boolean
/**
* 是否删除console
*
* 默认true
*/
dropConsole?: boolean
/**
* 资源生成gzip
* docs: https://github.com/webpack-contrib/compression-webpack-plugin
*/
gzip?: false | CompressionPlugin.Options<any>
}
export enum BabelConfigType {
/** 完全自定义的配置 */
custom = 'custom',
/** 追加的方式 */
add = 'add'
}
export type ArrayOptions = Array<string | Array<string | { [key: string]: any }>>
/**
* babel配置
*
* docs: https://babeljs.io/docs/en/config-files
*/
export interface BabelConfiguration {
/**
* 转换器
*/
presets?: ArrayOptions
/**
* 插件
*/
plugins?: ArrayOptions
/**
* 未来可能引入的配置
*/
[key: string]: any
}
/**
* CosmiconfigResult
*/
export type SmartCosmiconfigResult<T> = {
/**
* 配置
*/
config: T
/**
* 配置文件路径
*/
filepath: string
/**
* 配置是否为空
*/
isEmpty?: boolean
} | null