-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathucf.config.js
57 lines (55 loc) · 1.74 KB
/
ucf.config.js
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
require('@babel/polyfill');
var path = require('path')
const CopyPlugin = require('copy-webpack-plugin');
/**
* UCF配置文件 更多说明文档请看 https://github.com/iuap-design/ucf-web/blob/master/packages/ucf-scripts/README.md
*/
module.exports = (env, argv) => {
return {
context: "",// 上下文对象y
// 启动所有模块,默认这个配置,速度慢的时候使用另外的配置
// bootList: true,
// 启动这两个模块,启动调试、构建
bootList: [
"design",
"design-new",
"prepaper",
"ecology"
],
// 代理的配置
proxy: [
],
res_extra: true,
// 构建资源的时候产出sourceMap,调试服务不会生效
open_source_map: false,
// CSS loader 控制选项
css: {
modules: false
},
// 全局环境变量
global_env: {
TINPERVERSION:JSON.stringify("V2.4.0")
},
// 别名配置
alias: {
//'ucf-apps': path.resolve(__dirname, 'ucf-apps/')
'images': path.resolve(__dirname, 'ucf-apps/design/src/static/images'),
'components': path.resolve(__dirname, 'ucf-common/src/components'),
'static': path.resolve(__dirname, 'ucf-common/src/static'),
},
// 构建排除指定包
externals: {
//'tinper-bee': 'TinperBee'
},
// 加载器Loader
loader: [],
// 调试服务需要运行的插件
devPlugins: [],
// 构建服务需要运行的插件
buildPlugins: [
new CopyPlugin([
{ from: 'dist/*/*', to: 'design-new' }
]),
]
}
}