From 2a3490fe80850d24f779dce0131dbdac25043834 Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Wed, 18 Oct 2017 10:18:13 +0100 Subject: [PATCH] fix(@angular/cli): add missing webpack-sources dep `license-webpack-plugin` has a peer dependency on `webpack-sources` that was being satisfied via hoisting. Fix #8075 --- package.json | 1 + packages/@angular/cli/models/webpack-configs/production.ts | 7 +++++++ packages/@angular/cli/package.json | 1 + 3 files changed, 9 insertions(+) diff --git a/package.json b/package.json index d285040d9c30..2f9a15b9e77e 100644 --- a/package.json +++ b/package.json @@ -95,6 +95,7 @@ "webpack-dev-middleware": "~1.12.0", "webpack-dev-server": "~2.7.1", "webpack-merge": "^4.1.0", + "webpack-sources": "^1.0.0", "zone.js": "^0.8.14" }, "devDependencies": { diff --git a/packages/@angular/cli/models/webpack-configs/production.ts b/packages/@angular/cli/models/webpack-configs/production.ts index 1fa25fca2cff..15a338bee0d2 100644 --- a/packages/@angular/cli/models/webpack-configs/production.ts +++ b/packages/@angular/cli/models/webpack-configs/production.ts @@ -9,6 +9,13 @@ import { StaticAssetPlugin } from '../../plugins/static-asset'; import { GlobCopyWebpackPlugin } from '../../plugins/glob-copy-webpack-plugin'; import { WebpackConfigOptions } from '../webpack-config'; +/** + * license-webpack-plugin has a peer dependency on webpack-sources, list it in a comment to + * let the dependency validator know it is used. + * + * require('webpack-sources') + */ + export function getProdConfig(wco: WebpackConfigOptions) { const { projectRoot, buildOptions, appConfig } = wco; diff --git a/packages/@angular/cli/package.json b/packages/@angular/cli/package.json index 18c8a59b209e..1ff134ec54f4 100644 --- a/packages/@angular/cli/package.json +++ b/packages/@angular/cli/package.json @@ -79,6 +79,7 @@ "webpack-dev-middleware": "~1.12.0", "webpack-dev-server": "~2.7.1", "webpack-merge": "^4.1.0", + "webpack-sources": "^1.0.0", "zone.js": "^0.8.14" }, "optionalDependencies": {