Skip to content

Commit 2a3490f

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 3a14856 commit 2a3490f

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
@@ -95,6 +95,7 @@
9595
"webpack-dev-middleware": "~1.12.0",
9696
"webpack-dev-server": "~2.7.1",
9797
"webpack-merge": "^4.1.0",
98+
"webpack-sources": "^1.0.0",
9899
"zone.js": "^0.8.14"
99100
},
100101
"devDependencies": {

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,13 @@ import { StaticAssetPlugin } from '../../plugins/static-asset';
99
import { GlobCopyWebpackPlugin } from '../../plugins/glob-copy-webpack-plugin';
1010
import { WebpackConfigOptions } from '../webpack-config';
1111

12+
/**
13+
* license-webpack-plugin has a peer dependency on webpack-sources, list it in a comment to
14+
* let the dependency validator know it is used.
15+
*
16+
* require('webpack-sources')
17+
*/
18+
1219

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

packages/@angular/cli/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@
7979
"webpack-dev-middleware": "~1.12.0",
8080
"webpack-dev-server": "~2.7.1",
8181
"webpack-merge": "^4.1.0",
82+
"webpack-sources": "^1.0.0",
8283
"zone.js": "^0.8.14"
8384
},
8485
"optionalDependencies": {

0 commit comments

Comments
 (0)