File tree Expand file tree Collapse file tree 4 files changed +89
-107
lines changed Expand file tree Collapse file tree 4 files changed +89
-107
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,8 @@ import ExtractTextPlugin from 'extract-text-webpack-plugin';
6
6
import CopyWebpackPlugin from 'copy-webpack-plugin' ;
7
7
import HtmlWebpackPlugin from 'html-webpack-plugin' ;
8
8
import OptimizeJsPlugin from 'optimize-js-plugin' ;
9
+ import OptimizeCssAssetsPlugin from 'optimize-css-assets-webpack-plugin' ;
10
+ import mediaPacker from 'css-mqpacker' ;
9
11
import config from '../config' ;
10
12
import baseConfig from './base' ;
11
13
@@ -37,7 +39,8 @@ const conf = merge(baseConfig, {
37
39
postcss : [
38
40
autoprefixer ( {
39
41
browsers : [ 'last 3 versions' , 'not IE < 10' ]
40
- } )
42
+ } ) ,
43
+ mediaPacker ( )
41
44
]
42
45
}
43
46
} ,
@@ -130,7 +133,8 @@ const conf = merge(baseConfig, {
130
133
new webpack . optimize . CommonsChunkPlugin ( {
131
134
name : 'manifest' ,
132
135
chunks : [ 'vendor' ]
133
- } )
136
+ } ) ,
137
+ new OptimizeCssAssetsPlugin ( )
134
138
]
135
139
} ) ;
136
140
Original file line number Diff line number Diff line change @@ -5,6 +5,8 @@ import merge from 'webpack-merge';
5
5
import autoprefixer from 'autoprefixer' ;
6
6
import ExtractTextPlugin from 'extract-text-webpack-plugin' ;
7
7
import OptimizeJsPlugin from 'optimize-js-plugin' ;
8
+ import OptimizeCssAssetsPlugin from 'optimize-css-assets-webpack-plugin' ;
9
+ import mediaPacker from 'css-mqpacker' ;
8
10
import config from '../config' ;
9
11
import baseConfig from './base' ;
10
12
@@ -54,7 +56,8 @@ export default merge(baseConfig, {
54
56
postcss : [
55
57
autoprefixer ( {
56
58
browsers : [ 'last 3 versions' , 'not IE < 10' ]
57
- } )
59
+ } ) ,
60
+ mediaPacker ( )
58
61
]
59
62
}
60
63
} ,
@@ -109,6 +112,7 @@ export default merge(baseConfig, {
109
112
raw : true ,
110
113
entryOnly : true
111
114
} ) ,
112
- new ExtractTextPlugin ( '[name].css' )
115
+ new ExtractTextPlugin ( '[name].css' ) ,
116
+ new OptimizeCssAssetsPlugin ( )
113
117
]
114
118
} ) ;
Original file line number Diff line number Diff line change 61
61
"connect-history-api-fallback" : " ^1.3.0" ,
62
62
"copy-webpack-plugin" : " ^4.0.1" ,
63
63
"css-loader" : " ^0.26.1" ,
64
+ "css-mqpacker" : " ^5.0.1" ,
64
65
"element.scrollintoviewifneeded-polyfill" : " ^1.0.1" ,
65
66
"eslint" : " ^3.15.0" ,
66
67
"eslint-friendly-formatter" : " ^2.0.7" ,
74
75
"highlight.js" : " ^9.9.0" ,
75
76
"html-webpack-plugin" : " ^2.28.0" ,
76
77
"node-sass" : " ^4.5.0" ,
78
+ "optimize-css-assets-webpack-plugin" : " ^1.3.0" ,
77
79
"optimize-js-plugin" : " ^0.0.4" ,
78
80
"ora" : " ^1.1.0" ,
79
81
"raw-loader" : " ^0.5.1" ,
You can’t perform that action at this time.
0 commit comments