-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.config.js
More file actions
34 lines (34 loc) · 1015 Bytes
/
webpack.config.js
File metadata and controls
34 lines (34 loc) · 1015 Bytes
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
/**
* Created by heroxiao on 2016/5/27.
*/
var webpack=require('webpack')
module.exports={
entry:'./webpackdemo/enter.js',
output:{
path:'./webpackdemo/',
filename:'bundle.js'
},
module:{
loaders:[
{
test:/\.css$/, loader: 'style!css'
}
]
},
plugins:[
new webpack.BannerPlugin('鍒涘缓by heroxiao')
],
resolve: {
//查找module的话从这里开始查找
root: './webpackdemo/', //绝对路径
//自动扩展文件后缀名,意味着我们require模块可以省略不写后缀名
//extensions: ['', '.js', '.json', '.scss'],
//模块别名定义,方便后续直接引用别名,无须多写长长的地址
alias: {
module1 : 'module1.js',//后续直接 require('module1') 即可
module2 : 'module2.js',//后续直接 require('module1') 即可
module3 : 'module3.js',//后续直接 require('module1') 即可
paginate : 'vue-paginate.js'//后续直接 require('module1') 即可
}
}
}