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 d1c7b24b1a45..31189029766d 100644 --- a/packages/angular-cli/models/webpack-build-production.ts +++ b/packages/angular-cli/models/webpack-build-production.ts @@ -42,7 +42,10 @@ export const getWebpackProdConfigPartial = function(projectRoot: string, appConf [/\[?\(?/, /(?:)/] ], customAttrAssign: [/\)?\]?=/] - } + }, + postcss: [ + require('postcss-discard-comments') + ] } }) ],