@@ -3,8 +3,7 @@ var webpack = require('webpack');
33var outputPath = 'dist/' ;
44var port = process . env . PORT || 3001 ;
55var 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 ;
87var common = require ( './config.common' ) ;
98var baseUrl = '/' ;
109var isoConfig = require ( './config.isomorphic' ) ;
@@ -15,24 +14,26 @@ var ExtractTextPlugin = require('extract-text-webpack-plugin');
1514var IsomorphicPlugin = require ( 'webpack-isomorphic-tools/plugin' ) ;
1615
1716module . exports = {
18- devServerPort : port ,
1917 devtool : 'cheap-module-source-map' ,
2018 context : path . resolve ( __dirname , '..' ) ,
2119 entry : [ './client/index' ] ,
2220 output : {
2321 path : path . join ( __dirname , ( '../' + outputPath ) ) ,
24- filename : 'bundle .js' ,
22+ filename : '[name].[hash] .js' ,
2523 publicPath : assetHost
2624 } ,
2725 plugins : [
28- new ExtractTextPlugin ( 'styles.css' ) ,
26+ new webpack . optimize . DedupePlugin ( ) ,
27+ new ExtractTextPlugin ( '[name].[hash].css' ) ,
2928 new webpack . ContextReplacementPlugin ( / m o m e n t [ \/ \\ ] l o c a l e $ / , / e n | e s / ) ,
3029 new IsomorphicPlugin ( isoConfig ) ,
3130 new webpack . optimize . UglifyJsPlugin ( {
3231 compress : {
33- warnings : false
32+ screw_ie8 : true ,
33+ warnings : false ,
3434 }
3535 } ) ,
36+ new webpack . optimize . AggressiveMergingPlugin ( ) ,
3637 new CompressionPlugin ( {
3738 asset : '[file].gz' ,
3839 algorithm : 'gzip' ,
0 commit comments