@@ -3,8 +3,7 @@ var webpack = require('webpack');
3
3
var outputPath = 'dist/' ;
4
4
var port = process . env . PORT || 3001 ;
5
5
var hostname = process . env . HOSTNAME || 'localhost' ;
6
- var host = 'http://' + hostname + ':' + port ;
7
- var assetHost = process . env . ASSET_HOST || host + '/' + outputPath ;
6
+ var assetHost = process . env . ASSET_HOST || '/' + outputPath ;
8
7
var common = require ( './config.common' ) ;
9
8
var baseUrl = '/' ;
10
9
var isoConfig = require ( './config.isomorphic' ) ;
@@ -15,24 +14,26 @@ var ExtractTextPlugin = require('extract-text-webpack-plugin');
15
14
var IsomorphicPlugin = require ( 'webpack-isomorphic-tools/plugin' ) ;
16
15
17
16
module . exports = {
18
- devServerPort : port ,
19
17
devtool : 'cheap-module-source-map' ,
20
18
context : path . resolve ( __dirname , '..' ) ,
21
19
entry : [ './client/index' ] ,
22
20
output : {
23
21
path : path . join ( __dirname , ( '../' + outputPath ) ) ,
24
- filename : 'bundle .js' ,
22
+ filename : '[name].[hash] .js' ,
25
23
publicPath : assetHost
26
24
} ,
27
25
plugins : [
28
- new ExtractTextPlugin ( 'styles.css' ) ,
26
+ new webpack . optimize . DedupePlugin ( ) ,
27
+ new ExtractTextPlugin ( '[name].[hash].css' ) ,
29
28
new webpack . ContextReplacementPlugin ( / m o m e n t [ \/ \\ ] l o c a l e $ / , / e n | e s / ) ,
30
29
new IsomorphicPlugin ( isoConfig ) ,
31
30
new webpack . optimize . UglifyJsPlugin ( {
32
31
compress : {
33
- warnings : false
32
+ screw_ie8 : true ,
33
+ warnings : false ,
34
34
}
35
35
} ) ,
36
+ new webpack . optimize . AggressiveMergingPlugin ( ) ,
36
37
new CompressionPlugin ( {
37
38
asset : '[file].gz' ,
38
39
algorithm : 'gzip' ,
0 commit comments