-
Notifications
You must be signed in to change notification settings - Fork 14
/
webpack.pro.config.js
67 lines (61 loc) · 1.45 KB
/
webpack.pro.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
'use strict';
var webpack = require('webpack');
var HtmlWebpackPlugin = require('html-webpack-plugin')
var ExtractTextPlugin = require('extract-text-webpack-plugin')
/**
* Module dependencies
*/
module.exports = {
cache: false,
entry: {
'app': __dirname + '/app/entry'
},
output: {
path: 'build/',
filename: '[name].js',
chunkFilename: '[chunkhash].js'
},
module: {
loaders: [{
test: /\.html$/,
loader: 'html'
}, {
test: /\.svg/,
loader: 'file?prefix=font/'
},
{ test: /\.png$/, loader: "url-loader?limit=100000000" },
{ test: /\.jpg$/, loader: "url-loader?limit=100000000" }
]
},
resolve: {
root: [
'./node_modules',
'./app/lib'
],
moduleDirectories: [
'bower_components',
],
alias: {}
},
externals: {
"angular": "angular",
"uirouter": "\'ui.router\'",
'ionic': 'ionic'
},
plugins: [
new HtmlWebpackPlugin({
template: './app/index.ejs',
title: 'Angular with webpack',
inject: 'body'
}),
new webpack.optimize.UglifyJsPlugin({
output: {
comments: false,
},
compress: {
warnings: false
}
}),
],
//watch:true
};