-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
35 lines (32 loc) · 1.06 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
var path = require('path');
var node_modules = path.resolve(__dirname, 'node_modules');
var config = {
addVendor: function(name, path) {
this.resolve.alias[name] = path;
this.module.noParse.push(path);
},
entry: [
path.resolve(__dirname, 'app/main.js')
],
resolve: {
alias: {}
},
output: {
path: path.resolve(__dirname, 'build'),
filename: 'bundle.js'
},
module: {
noParse: [],
loaders: [
{ test: /\.js$/, loader: 'jsx' },
{ test: /\.css$/, loader: 'style!css' },
{ test: /\.less$/, loader: 'style!css!less' },
{ test: /\.(png|jpg)$/, loader: 'url?limit=25000' },
{ test: /\.woff$/, loader: 'url?limit=100000' }
]
}
};
//config.addVendor('react', path.resolve(node_modules, 'react/dist/react.min.js'));
//config.addVendor('jquery', path.resolve(node_modules, 'jquery/dist/jquery.min.js'));
//config.addVendor('bootstrapCss', path.resolve(node_modules, 'bootstrap/dist/css/bootstrap.min.css'));
module.exports = config;