/
webpack.config.js
38 lines (35 loc) · 1.22 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
var path = require('path');
var webpack = require('webpack');
module.exports = {
entry: {
client: './src/app',
},
output: {
// Make sure to use [name] or [id] in output.filename
// when using multiple entry points
path: path.join(__dirname, 'app'),
filename: "entry.[name].js",
chunkFilename: "dependency.[id].js",
publicPath: '/app/'
},
module: {
loaders: [
{ test: /\.js$/, exclude: /node_modules/, loader: 'babel-loader'}
//, { test: /\.html$/, loader: "ngtemplate?module=weatherApp&relativeTo=" + (path.resolve(__dirname, './src')) + "/!html" }
//{ test: /\.css$/, loader: "style!css" },
//{ test: /\.less$/, loader: 'style?-singleton!css!less'},
//{ test: /\.png$/, loader: 'file'},
//{ test: /\.(ttf|eot|svg|woff|woff2)(\?v=[0-9]\.[0-9]\.[0-9])?$/, loader: "file" }
]
},
plugins: [
new webpack.optimize.DedupePlugin()
],
// http://stackoverflow.com/questions/28647147/how-can-i-injector-angular-module-in-webpack
resolve: {
alias: {
'ngRoute': 'angular-route',
'ngResource': 'angular-resource'
}
}
};