forked from edusoho/edusoho
-
Notifications
You must be signed in to change notification settings - Fork 2
/
webpack.config.js
102 lines (102 loc) · 3.64 KB
/
webpack.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
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
module.exports = {
output: {
path: 'web/static-dist/', // 用于生产环境下的输出目录
publicPath: '/static-dist/', // 用于开发环境下的输出目录
},
libs: {
'base': ['libs/base.js'], // 基础类库
'html5shiv': ['html5shiv'],
'fix-ie': ['console-polyfill', 'respond-js'], //也可以是一个npm依赖包
'jquery-insertAtCaret': ['libs/jquery-insertAtCaret.js'],
'jquery-nouislider': ['libs/jquery-nouislider.js'],
'jquery-sortable': ['es-jquery-sortable'],
'swiper': ['swiper'],
'perfect-scrollbar': ['libs/perfect-scrollbar/index.js'],
'jquery-validation': ['libs/jquery-validation.js'],
'jquery-intro': ['libs/jquery-intro/index.js'],
'bootstrap-datetimepicker': ['libs/datetimepicker/index.js'],
'bootstrap-daterangepicker': ['libs/bootstrap-daterangepicker.js'],
'iframe-resizer': ['libs/iframe-resizer.js'],
'iframe-resizer-contentWindow': ['libs/iframe-resizer-contentWindow.js'],
'jquery-timer': ['libs/jquery-timer.js'],
'jquery-countdown': ['libs/jquery-countdown.js'],
'jquery-cycle2': ['jquery-cycle2'],
'excanvas-compiled': ['libs/excanvas-compiled.js'],
'echo-js': ['echo-js'],
'jquery-blurr': ['jquery-blurr'],
'jquery-waypoints': ['jquery-waypoints'],
'jquery-raty': ['libs/jquery-raty.js'],
'echarts': ['echarts'],
'select2': ['libs/select2/index.js'],
'handlebars': ['handlebars'],
'fullcalendar': ['libs/fullcalendar/index.js'],
'ltc-sdk-client': ['libs/ltc-sdk-client/index.js'],
'ltc-sdk-server': ['libs/ltc-sdk-server/index.js']
},
noParseDeps: { // 不解析依赖,加快编译速度
'jquery': 'jquery/dist/jquery.js',
'bootstrap': 'bootstrap/dist/js/bootstrap.js',
'jquery-validation': 'jquery-validation/dist/jquery.validate.js',
'perfect-scrollbar': 'perfect-scrollbar/dist/js/perfect-scrollbar.jquery.js',
'bootstrap-notify': 'bootstrap-notify/bootstrap-notify.js',
'store': 'store/store.js',
'respond-js': 'respond.js/dest/respond.src.js',
'console-polyfill': 'console-polyfill/index.js',
'html5shiv': 'html5shiv/dist/html5shiv.js',
'bootstrap-daterangepicker': 'bootstrap-daterangepicker/daterangepicker.js',
'bootstrap-datetime-picker': 'bootstrap-datetime-picker/js/bootstrap-datetimepicker.js',
'jquery-sortable': 'es-jquery-sortable/source/js/jquery-sortable.js',
'jquery-cycle2': 'jquery.cycle2/src/jquery.cycle2.min.js',
'nouislider': 'nouislider/distribute/nouislider.js',
'echo-js': 'echo-js/dist/echo.js',
'jquery-waypoints': 'jquery-waypoints/waypoints.js',
'echarts': 'echarts/dist/echarts.js',
'handlebars': 'handlebars/dist/handlebars.min.js',
'moment': 'moment/moment.js',
'fullcalendar': 'es-fullcalendar/dist/fullcalendar.js',
'codeages-design': 'codeages-design/dist/codeages-design.js'
},
onlyCopys: [ //纯拷贝文件到输出的libs目录下
{
name: 'es-ckeditor',
ignore: [
'**/samples/**',
'**/kityformula/libs/**',
]
},
{
name: 'es5-shim/es5-shim.js',
},
{
name: 'es5-shim/es5-sham.js',
},
{
name: 'easy-pie-chart/dist/jquery.easypiechart.js',
},
{
name: 'jquery/dist/jquery.min.js',
},
{
name: 'codeages-design',
ignore: [
'node_modules/**',
'src/**',
]
},
{
name: 'jquery-validation/dist/jquery.validate.js'
},
{
name: 'bootstrap',
ignore: [
'grunt/**',
'js/**',
'less/**',
]
}
],
extryCssName: '{main,header,bootstrap,mobile,admin}',
isESlint: false,
baseName: 'libs/base,libs/ltc-sdk',
activitiesDir: 'web/activities',
};