-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.ts
107 lines (100 loc) · 2.7 KB
/
index.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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
// webpack部分
// ----------
// 入口起点
import EntryPoints from './webpackModule/EntryPoints'
// 输出
import Output from './webpackModule/Output'
// 模式
import Mode from './webpackModule/Mode'
// 加载器
import loader from './webpackModule/loader'
// 插件
import Plugins from './webpackModule/Plugins'
// 解析
import Resolve from './webpackModule/Resolve'
// 载入开发中
import DevServer from './webpackModule/DevServer'
// 监控
import Watch from './webpackModule/Watch'
// 外部扩展
import externals from './webpackModule/externals'
// 性能
import Performance from './webpackModule/Performance'
// roadhog部分
// ----------
import defaultConfig from './roadhogModule/defaultConfig';
import entry from './roadhogModule/entry';
import disableCSSModules from './roadhogModule/disableCSSModules';
import cssModulesExclude from './roadhogModule/cssModulesExclude';
import hash from './roadhogModule/hash';
import publicPath from './roadhogModule/publicPath';
import outputPath from './roadhogModule/outputPath';
import extraBabelPlugins from './roadhogModule/extraBabelPlugins';
import extraPostCSSPlugins from './roadhogModule/extraPostCSSPlugins';
import autoprefixer from './roadhogModule/autoprefixer';
import sass from './roadhogModule/sass';
import proxy from './roadhogModule/proxy';
export interface roadhogParam1
extends
defaultConfig, entry,
disableCSSModules, cssModulesExclude,
hash, publicPath, outputPath,
extraPostCSSPlugins, autoprefixer,
sass, proxy, externals
{
library?:any,
libraryTarget?:any,
multipage?:any,
define?:any,
env?:any,
theme?:any,
svgSpriteLoaderDirs?:any,
}
export interface roadhogParam2 extends roadhogParam1 {
alias?:any,
extraResolveExtensions?:any,
browserslist?:any,
devtool?:any,
commons?:any,
html?:any,
extraBabelIncludes?:any,
copy?:any,
manifest?:any,
ignoreMomentLocale?:any,
disableDynamicImport?:any,
}
export interface webpackParam
extends
EntryPoints,Output,
Mode, loader, Plugins,
Resolve, DevServer, Watch,
externals, Performance
{
/**
* 说明:
* ---
* 此选项控制是否生成,以及如何生成 source map。
*
* @type {(string | boolean)}
* @memberof webpackParam
*/
devtool?:string | boolean,
/**
* 说明:
* ---
* 告知 webpack 为目标(target)指定一个环境。
*
* @type {(string | Function)}
* @memberof webpackParam
*/
target?:string | Function
}
export const roadhog1 = (param:roadhogParam1) =>{
return param
}
export const roadhog2 = (param:roadhogParam2) => {
return param
}
export const webpack = (param:webpackParam) =>{
return param
}