File tree 4 files changed +6
-6
lines changed 4 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 48
48
"chalk" : " ^1.1.3" ,
49
49
"common-tags" : " ^1.3.1" ,
50
50
"css-loader" : " ^0.26.1" ,
51
+ "cssnano" : " ^3.10.0" ,
51
52
"debug" : " ^2.1.3" ,
52
53
"denodeify" : " ^1.2.1" ,
53
54
"diff" : " ^2.2.2" ,
81
82
"opn" : " 4.0.1" ,
82
83
"ora" : " ^0.2.0" ,
83
84
"portfinder" : " 1.0.9" ,
84
- "postcss-discard-comments" : " ^2.0.4" ,
85
85
"postcss-loader" : " ^0.9.1" ,
86
86
"raw-loader" : " ^0.5.1" ,
87
87
"reflect-metadata" : " ^0.1.8" ,
Original file line number Diff line number Diff line change @@ -13,7 +13,6 @@ export const getProdConfig = function (wco: WebpackConfigOptions) {
13
13
new webpack . DefinePlugin ( {
14
14
'process.env.NODE_ENV' : JSON . stringify ( 'production' )
15
15
} ) ,
16
- new webpack . LoaderOptionsPlugin ( { minimize : true } ) ,
17
16
new webpack . optimize . UglifyJsPlugin ( < any > {
18
17
mangle : { screw_ie8 : true } ,
19
18
compress : { screw_ie8 : true , warnings : buildOptions . verbose } ,
Original file line number Diff line number Diff line change 6
6
import { extraEntryParser , getOutputHashFormat } from './utils' ;
7
7
import { WebpackConfigOptions } from '../webpack-config' ;
8
8
9
- const postcssDiscardComments = require ( 'postcss-discard-comments ' ) ;
9
+ const cssnano = require ( 'cssnano ' ) ;
10
10
const autoprefixer = require ( 'autoprefixer' ) ;
11
11
const ExtractTextPlugin = require ( 'extract-text-webpack-plugin' ) ;
12
12
@@ -38,9 +38,10 @@ export function getStylesConfig(wco: WebpackConfigOptions) {
38
38
// https://github.com/webpack-contrib/style-loader#recommended-configuration
39
39
const cssSourceMap = buildOptions . extractCss && buildOptions . sourcemap ;
40
40
41
- // discard comments in production
41
+ // minify/optimize css in production
42
+ // autoprefixer is always run separately so disable here
42
43
const extraPostCssPlugins = buildOptions . target === 'production'
43
- ? [ postcssDiscardComments ]
44
+ ? [ cssnano ( { safe : true , autoprefixer : false } ) ]
44
45
: [ ] ;
45
46
46
47
// determine hashing format
Original file line number Diff line number Diff line change 38
38
"chalk" : " ^1.1.3" ,
39
39
"common-tags" : " ^1.3.1" ,
40
40
"css-loader" : " ^0.26.1" ,
41
+ "cssnano" : " ^3.10.0" ,
41
42
"debug" : " ^2.1.3" ,
42
43
"denodeify" : " ^1.2.1" ,
43
44
"diff" : " ^2.2.2" ,
68
69
"opn" : " 4.0.1" ,
69
70
"ora" : " ^0.2.0" ,
70
71
"portfinder" : " 1.0.9" ,
71
- "postcss-discard-comments" : " ^2.0.4" ,
72
72
"postcss-loader" : " ^0.9.1" ,
73
73
"raw-loader" : " ^0.5.1" ,
74
74
"remap-istanbul" : " ^0.6.4" ,
You can’t perform that action at this time.
0 commit comments