From c76985c72e28c313ed9233af11bc59857253a17e 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 9eac55759a7d..8591f30abf42 100644 --- a/package.json +++ b/package.json @@ -98,6 +98,7 @@ "webpack-dev-middleware": "~1.12.0", "webpack-dev-server": "~2.7.1", "webpack-merge": "^4.1.0", + "webpack-sources": "^1.0.0", "webpack-subresource-integrity": "^1.0.1", "zone.js": "^0.8.14" }, diff --git a/packages/@angular/cli/models/webpack-configs/production.ts b/packages/@angular/cli/models/webpack-configs/production.ts index c7e5917b331c..30946c21f763 100644 --- a/packages/@angular/cli/models/webpack-configs/production.ts +++ b/packages/@angular/cli/models/webpack-configs/production.ts @@ -13,6 +13,13 @@ import { readTsconfig } from '../../utilities/read-tsconfig'; const UglifyJSPlugin = require('uglifyjs-webpack-plugin'); +/** + * 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 a76c95293a49..1a19f6bd3371 100644 --- a/packages/@angular/cli/package.json +++ b/packages/@angular/cli/package.json @@ -81,6 +81,7 @@ "webpack-dev-middleware": "~1.12.0", "webpack-dev-server": "~2.7.1", "webpack-merge": "^4.1.0", + "webpack-sources": "^1.0.0", "webpack-subresource-integrity": "^1.0.1", "zone.js": "^0.8.14" },