From 532f8e737efffda1446318cc634b92ccbdc0cc25 Mon Sep 17 00:00:00 2001 From: Kristofer Karlsson Date: Sun, 9 Oct 2016 00:30:52 +0200 Subject: [PATCH] feat(build): added postcss-discard-comments Close #2593 --- package.json | 1 + packages/angular-cli/models/webpack-build-production.ts | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) 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') + ] } }) ],