diff --git a/package.json b/package.json index 9d1c591289ae..d4aaefbdc9b7 100644 --- a/package.json +++ b/package.json @@ -84,6 +84,7 @@ "offline-plugin": "^3.4.1", "opn": "4.0.1", "parse5": "^2.1.5", + "postcss-discard-comments": "^2.0.4", "postcss-loader": "^0.9.1", "protractor": "^3.3.0", "raw-loader": "^0.5.1", diff --git a/packages/angular-cli/models/webpack-build-production.ts b/packages/angular-cli/models/webpack-build-production.ts index 52256fe7fb5b..09caf19c223a 100644 --- a/packages/angular-cli/models/webpack-build-production.ts +++ b/packages/angular-cli/models/webpack-build-production.ts @@ -43,7 +43,10 @@ export const getWebpackProdConfigPartial = function(projectRoot: string, appConf [/\[?\(?/, /(?:)/] ], customAttrAssign: [/\)?\]?=/] - } + }, + postcss: [ + require('postcss-discard-comments') + ] } }) ],