-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.build.conf.js
37 lines (36 loc) · 1.06 KB
/
webpack.build.conf.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
const webpack = require('webpack');
const CleanWebpackPlugin = require('clean-webpack-plugin');
const {join,resolve} = require('path');
module.exports = function(){
return {
entry:{
DoAnalyClass:join(__dirname,'./analyApi/DoAnalyClass.js'),
DoAnalyController:join(__dirname,'./analyApi/DoAnalyController.js'),
DoApi2Type:join(__dirname,'./api2Service/DoApi2Type.js'),
DoDoc:join(__dirname,'./api2Service/DoDoc.js'),
DoMock:join(__dirname,'./api2Service/DoMock.js')
},
output:{
publicPath:"./",
path: join(__dirname , "./libs"),//打包后的文件存放的地方
filename: "js/[name].js"//打包后输出文件的文件名
},
externals: {
fs: "fs",
path: "path",
'../conf':'conf',
'mockjs':'mockjs',
"ejs":"ejs",
"allClass":"allClass",
"classTools":"classTools",
"mockCfg":"mockCfg"
},
plugins:[
new CleanWebpackPlugin(['libs'],{
root:resolve(__dirname,'./js'),
verbose:true
}),
new webpack.BannerPlugin('zengxiao版权所有,翻版必究')
]
}
}