diff --git a/packages/@angular/cli/models/webpack-configs/browser.ts b/packages/@angular/cli/models/webpack-configs/browser.ts index b85670529389..8a75e34dafc7 100644 --- a/packages/@angular/cli/models/webpack-configs/browser.ts +++ b/packages/@angular/cli/models/webpack-configs/browser.ts @@ -37,7 +37,12 @@ export function getBrowserConfig(wco: WebpackConfigOptions) { filename: path.resolve(buildOptions.outputPath, appConfig.index), chunksSortMode: packageChunkSort(appConfig), excludeChunks: lazyChunks, - xhtml: true + xhtml: true, + minify: buildOptions.target === 'production' ? { + caseSensitive: true, + collapseWhitespace: true, + keepClosingSlash: true + } : false }), new BaseHrefWebpackPlugin({ baseHref: buildOptions.baseHref