This repository was archived by the owner on Jun 28, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +16
-3
lines changed
Expand file tree Collapse file tree 3 files changed +16
-3
lines changed Original file line number Diff line number Diff line change 5656 "cache-manager" : " 1.5.0" ,
5757 "clean-webpack-plugin" : " 0.1.10" ,
5858 "compression" : " 1.6.2" ,
59+ "compression-webpack-plugin" : " 0.3.2" ,
5960 "cookie-parser" : " 1.4.3" ,
6061 "copy-to-clipboard" : " 3.0.5" ,
6162 "cors" : " 2.7.1" ,
9293 "react-dom" : " 15.4.1" ,
9394 "react-helmet" : " 3.1.0" ,
9495 "react-inlinesvg" : " 0.5.4" ,
96+ "react-intl" : " 2.1.5" ,
9597 "react-metrics" : " 1.2.1" ,
9698 "react-paginate" : " 4.1.0" ,
9799 "react-redux" : " 5.0.1" ,
117119 "url-loader" : " 0.5.7" ,
118120 "webpack" : " 2.1.0-beta.20" ,
119121 "webpack-isomorphic-tools" : " 2.5.7" ,
120- "react-intl" : " 2.1.5" ,
121122 "winston" : " 1.1.2"
122123 },
123124 "devDependencies" : {
170171 "wdio-mocha-framework" : " 0.3.7" ,
171172 "wdio-spec-reporter" : " 0.0.3" ,
172173 "webdriverio" : " 4.2.1" ,
174+ "webpack-bundle-analyzer" : " 2.2.1" ,
173175 "webpack-dev-server" : " 1.6.5" ,
174176 "webpack-hot-middleware" : " 2.12.2"
175177 },
Original file line number Diff line number Diff line change 11require ( 'dotenv' ) . load ( ) ;
22const webpack = require ( 'webpack' ) ;
33const path = require ( 'path' ) ;
4+ const BundleAnalyzerPlugin = require ( 'webpack-bundle-analyzer' ) . BundleAnalyzerPlugin ;
45const IsomorphicPlugin = require ( 'webpack-isomorphic-tools/plugin' ) ;
56const webpackIsomorphicToolsPlugin = new IsomorphicPlugin ( require ( './isomorphic-tools-configuration' ) ) ; // eslint-disable-line max-len, global-require
67
@@ -113,7 +114,8 @@ module.exports = {
113114 new webpack . EnvironmentPlugin ( [
114115 'NODE_ENV'
115116 ] ) ,
116- webpackIsomorphicToolsPlugin . development ( )
117+ webpackIsomorphicToolsPlugin . development ( ) ,
118+ new BundleAnalyzerPlugin ( )
117119 ] ,
118120 stats : {
119121 colors : true ,
Original file line number Diff line number Diff line change 11const path = require ( 'path' ) ;
22const ExtractTextPlugin = require ( 'extract-text-webpack-plugin' ) ;
33const webpack = require ( 'webpack' ) ;
4+ const CompressionPlugin = require ( 'compression-webpack-plugin' ) ;
45const CleanPlugin = require ( 'clean-webpack-plugin' ) ;
56const IsomorphicPlugin = require ( 'webpack-isomorphic-tools/plugin' ) ;
67const strip = require ( 'strip-loader' ) ;
78
89const webpackIsomorphicToolsPlugin = new IsomorphicPlugin ( require ( './isomorphic-tools-configuration' ) ) ; // eslint-disable-line max-len, global-require
10+
911const relativeAssetsPath = '../static/dist' ;
1012const assetsPath = path . join ( __dirname , relativeAssetsPath ) ;
1113
@@ -19,7 +21,7 @@ module.exports = {
1921
2022 } ,
2123 context : path . resolve ( __dirname , '../src' ) ,
22- devtool : 'cheap-source-map' ,
24+ devtool : 'cheap-module- source-map' ,
2325 debug : false ,
2426 target : 'web' ,
2527 cache : false ,
@@ -142,6 +144,13 @@ module.exports = {
142144 minimize : true ,
143145 debug : false
144146 } ) ,
147+ new CompressionPlugin ( {
148+ asset : '[path].gz[query]' ,
149+ algorithm : 'gzip' ,
150+ test : / \. j s $ | \. c s s $ | \. h t m l $ / ,
151+ threshold : 10240 ,
152+ minRatio : 0
153+ } ) ,
145154 webpackIsomorphicToolsPlugin
146155 ]
147156} ;
You can’t perform that action at this time.
0 commit comments