-
Notifications
You must be signed in to change notification settings - Fork 0
/
types.ts
82 lines (76 loc) · 1.44 KB
/
types.ts
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
72
73
74
75
76
77
78
79
80
81
82
import CompressionPlugin = require('compression-webpack-plugin')
/**
* styles-webpack-plugin 样式资源 插件的可配参数
*/
export interface StylesWebpackPluginOptions {
/**
* 启用缓存,指定缓存路径
*
* 默认development环境启用
*/
cacheDirectory?: string | boolean
/**
* css-loader的options配置
*/
cssLoader?:
| false
| {
/**
* 启用/禁用 CSS 模块和设置模式
*/
modules?: any
/**
* 未来可能引入的配置
*/
[key: string]: any
}
/**
* 资源生成gzip
* docs: https://github.com/webpack-contrib/compression-webpack-plugin
*/
gzip?: false | CompressionPlugin.Options<any>
}
/**
* postcss 方法类型
*/
type PostcssFunctionPlugins = (loader?: object) => Array<any>
/**
* postcss 插件类型
*/
export type PostcssPlugins = { [key: string]: any } | PostcssFunctionPlugins
/**
* postcss配置
*
* docs: https://github.com/postcss/postcss#usage
*/
export interface PostcssConfiguration {
/**
* postcss采用什么语法
*/
ident?: string
/**
* postcss插件
*/
plugins?: PostcssPlugins
/**
* 未来可能引入的配置
*/
[key: string]: any
}
/**
* CosmiconfigResult
*/
export type SmartCosmiconfigResult<T> = {
/**
* 配置
*/
config: T
/**
* 配置文件路径
*/
filepath: string
/**
* 配置是否为空
*/
isEmpty?: boolean
} | null