-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
29 lines (28 loc) · 931 Bytes
/
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
var path = require('path');
var webpack = require('webpack');
var HtmlWebpackPlugin = require('html-webpack-plugin');
module.exports = {
devtool: 'inline-source-map',
entry: {},
module: {
loaders: [
{test: /\.js$/, exclude: [/app\/lib/, /node_modules/], loader: 'ng-annotate!babel'},
{test: /\.html$/, loader: 'raw'},
{test: /\.scss$/, loader: 'style!css?sourceMap!sass?sourceMap'},
{test: /\.css$/, loader: 'style!css'}
]
},
plugins: [
new HtmlWebpackPlugin({
template: 'client/index.html',
inject: 'body',
hash: true
}),
new webpack.optimize.CommonsChunkPlugin({
name: 'vendor',
minChunks: function (module, count) {
return module.resource && module.resource.indexOf(path.resolve(__dirname, 'client')) === -1;
}
})
]
};