Skip to content

Commit c76985c

Browse files
committed
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
1 parent 7f5529d commit c76985c

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@
9898
"webpack-dev-middleware": "~1.12.0",
9999
"webpack-dev-server": "~2.7.1",
100100
"webpack-merge": "^4.1.0",
101+
"webpack-sources": "^1.0.0",
101102
"webpack-subresource-integrity": "^1.0.1",
102103
"zone.js": "^0.8.14"
103104
},

packages/@angular/cli/models/webpack-configs/production.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,13 @@ import { readTsconfig } from '../../utilities/read-tsconfig';
1313

1414
const UglifyJSPlugin = require('uglifyjs-webpack-plugin');
1515

16+
/**
17+
* license-webpack-plugin has a peer dependency on webpack-sources, list it in a comment to
18+
* let the dependency validator know it is used.
19+
*
20+
* require('webpack-sources')
21+
*/
22+
1623

1724
export function getProdConfig(wco: WebpackConfigOptions) {
1825
const { projectRoot, buildOptions, appConfig } = wco;

packages/@angular/cli/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@
8181
"webpack-dev-middleware": "~1.12.0",
8282
"webpack-dev-server": "~2.7.1",
8383
"webpack-merge": "^4.1.0",
84+
"webpack-sources": "^1.0.0",
8485
"webpack-subresource-integrity": "^1.0.1",
8586
"zone.js": "^0.8.14"
8687
},

0 commit comments

Comments
 (0)