Skip to content

Commit 06b484e

Browse files
alan-agius4clydin
authored andcommitted
build: force resolution of @types/copy-webpack-plugin/webpack
This resolution is needed as otherwise if webpack versions are not on the exact version the compilation will fail. Example of such errors; ``` packages/angular_devkit/build_angular/src/webpack/configs/common.ts:219:7 - error TS2345: Argument of type 'CopyPlugin' is not assignable to parameter of type '{ apply(compiler: Compiler): void; }'. Types of property 'apply' are incompatible. Type '(compiler: import("/home/circleci/ng/node_modules/@types/copy-webpack-plugin/node_modules/webpack/types").Compiler) => void' is not assignable to type '(compiler: import("/home/circleci/ng/node_modules/webpack/types").Compiler) => void'. Types of parameters 'compiler' and 'compiler' are incompatible. Type 'import("/home/circleci/ng/node_modules/webpack/types").Compiler' is not assignable to type 'import("/home/circleci/ng/node_modules/@types/copy-webpack-plugin/node_modules/webpack/types").Compiler'. The types of 'hooks.shouldEmit' are incompatible between these types. Type 'import("/home/circleci/ng/node_modules/tapable/tapable").SyncBailHook<[import("/home/circleci/ng/node_modules/webpack/types").Compilation], boolean, import("/home/circleci/ng/node_modules/tapable/tapable").UnsetAdditionalOptions>' is not assignable to type 'import("/home/circleci/ng/node_modules/tapable/tapable").SyncBailHook<[import("/home/circleci/ng/node_modules/@types/copy-webpack-plugin/node_modules/webpack/types").Compilation], boolean, import("/home/circleci/ng/node_modules/tapable/tapable").UnsetAdditionalOptions>'. 219 new CopyWebpackPlugin({ ~~~~~~~~~~~~~~~~~~~~~~~ 220 patterns: copyWebpackPluginPatterns, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 221 }), ~~~~~~~~ ``` (cherry picked from commit fdbbcfd)
1 parent 529a5bd commit 06b484e

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@
6161
"@angular/compiler-cli"
6262
]
6363
},
64+
"resolutions": {
65+
"**/@types/copy-webpack-plugin/webpack": "5.36.1"
66+
},
6467
"devDependencies": {
6568
"@angular/animations": "12.0.0-rc.0",
6669
"@angular/cdk": "11.2.10",

yarn.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11740,7 +11740,7 @@ [email protected]:
1174011740
dependencies:
1174111741
webpack-sources "^1.3.0"
1174211742

11743-
11743+
[email protected], webpack@^5.1.0:
1174411744
version "5.36.1"
1174511745
resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.36.1.tgz#d82bad3384f84ed45a8de3844c31730f56361ab7"
1174611746
integrity sha512-2u25a82T+6quAxSlzEpN/R/RICwt20ONU3z3Ko05S8KVH9FXILcBYb2hD/rQtZT5y7lRAIsIIs05pdndY7ourQ==

0 commit comments

Comments
 (0)